aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2015-02-06 18:13:29 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2015-02-06 18:13:29 +0000
commit1d5fd39ab3995da8a665b10487de1421bbe496ec (patch)
tree08752f9877113dc9414db85b3a60bbf6af3c0766 /sbin
parent83099abb6e111fadeaf6b131f4c94c4788b1d421 (diff)
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/nat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c
index 6bec36c27396..8c877a18864c 100644
--- a/sbin/ipfw/nat.c
+++ b/sbin/ipfw/nat.c
@@ -156,9 +156,9 @@ set_addr_dynamic(const char *ifn, struct cfg_nat *n)
}
}
if (sin == NULL)
- errx(1, "%s: cannot get interface address", ifn);
-
- n->ip = sin->sin_addr;
+ n->ip.s_addr = htonl(INADDR_ANY);
+ else
+ n->ip = sin->sin_addr;
strncpy(n->if_name, ifn, IF_NAMESIZE);
free(buf);