mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
fbf475403b
Refresh patches and backport upstream to current HEAD: a997ca0 Fix sometimes missing DNSSEC RRs when DNSSEC validation not enabled. 51e4eee Fix address-dependent domains for IPv6. 05ff659 Fix stupid infinite loop introduced by preceding commit. db0f488 Handle some corner cases in RA contructed interfaces with addresses changing interface. 7dcca6c Warn about the impact of cache-size on performance. 090856c Allow zone transfer in authoritative mode whenever auth-peer is specified. cc5cc8f Sane error message when pcap file header is wrong. c488b68 Handle standard and contructed dhcp-ranges on the same interface. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
26 lines
1006 B
Diff
26 lines
1006 B
Diff
From cc5cc8f1e0b4deaaea4cbefe677989b186c84837 Mon Sep 17 00:00:00 2001
|
|
From: Simon Kelley <simon@thekelleys.org.uk>
|
|
Date: Sat, 2 Jun 2018 14:45:17 +0100
|
|
Subject: [PATCH 12/17] Sane error message when pcap file header is wrong.
|
|
|
|
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
|
|
---
|
|
src/dump.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
--- a/src/dump.c
|
|
+++ b/src/dump.c
|
|
@@ -64,9 +64,10 @@ void dump_init(void)
|
|
die(_("cannot create %s: %s"), daemon->dump_file, EC_FILE);
|
|
}
|
|
else if ((daemon->dumpfd = open(daemon->dump_file, O_APPEND | O_RDWR)) == -1 ||
|
|
- !read_write(daemon->dumpfd, (void *)&header, sizeof(header), 1) ||
|
|
- header.magic_number != 0xa1b2c3d4)
|
|
+ !read_write(daemon->dumpfd, (void *)&header, sizeof(header), 1))
|
|
die(_("cannot access %s: %s"), daemon->dump_file, EC_FILE);
|
|
+ else if (header.magic_number != 0xa1b2c3d4)
|
|
+ die(_("bad header in %s"), daemon->dump_file, EC_FILE);
|
|
else
|
|
{
|
|
/* count existing records */
|