projects
/
oweals
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
577a152
)
validate incoming interface
author
John Crispin
<blogic@openwrt.org>
Sat, 30 Aug 2014 11:17:02 +0000
(13:17 +0200)
committer
John Crispin
<blogic@openwrt.org>
Sat, 30 Aug 2014 11:17:15 +0000
(13:17 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index 0d34e72fde36b579b7200ade1c1a9c7e5eb0a7f5..b875fd4759c79f7fb542ed07fd4d258a1e0c0019 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-174,10
+174,10
@@
read_socket(struct uloop_fd *u, unsigned int events)
else if (cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_PKTINFO)
ifindex = ((struct in6_pktinfo *) c)->ipi6_ifindex;
}
- if (ifindex)
+ if (ifindex != iface->ifindex)
+ fprintf(stderr, "invalid iface index %d != %d\n", ifindex, iface->ifindex);
+ else
dns_handle_packet(iface, buffer, len);
-
- printf("%d\n", ifindex);
}
static int