projects
/
project
/
firewall3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2807cc2
)
utils: ifa_addr may be NULL, skip such entries
author
Jo-Philipp Wich
<
[email protected]
>
Mon, 11 Aug 2014 17:42:59 +0000
(19:42 +0200)
committer
Jo-Philipp Wich
<
[email protected]
>
Mon, 11 Aug 2014 17:42:59 +0000
(19:42 +0200)
Signed-off-by: Jo-Philipp Wich <
[email protected]
>
utils.c
patch
|
blob
|
history
diff --git
a/utils.c
b/utils.c
index d8a881c7552369150aa8da2c80bd68175301d765..cb478bb81c7a95eb97f9650bbb6f541ec32194e0 100644
(file)
--- a/
utils.c
+++ b/
utils.c
@@
-529,7
+529,7
@@
write_zone_uci(struct uci_context *ctx, struct fw3_zone *z,
for (ifa = ifaddr; ifa; ifa = ifa->ifa_next)
{
- if (strcmp(dev->name, ifa->ifa_name))
+ if (
!ifa->ifa_addr ||
strcmp(dev->name, ifa->ifa_name))
continue;
if (ifa->ifa_addr->sa_family == AF_INET)
@@
-852,7
+852,7
@@
fw3_flush_conntrack(void *state)
{
for (ifa = ifaddr; ifa && !found; ifa = ifa->ifa_next)
{
- if (strcmp(dev->name, ifa->ifa_name))
+ if (
!ifa->ifa_addr ||
strcmp(dev->name, ifa->ifa_name))
continue;
sin = (struct sockaddr_in *)ifa->ifa_addr;