diff options
author | Paolo Pisati <piso@FreeBSD.org> | 2009-04-11 15:26:31 +0000 |
---|---|---|
committer | Paolo Pisati <piso@FreeBSD.org> | 2009-04-11 15:26:31 +0000 |
commit | 50d25dda1b08a57e63d3133070cfec6d0efdcfd2 (patch) | |
tree | f43f07bd83809c93a48735b6229ab6bc28d70329 | |
parent | ea80b0ac039be76520bfd2a5be9527a4dc68f0d8 (diff) |
Notes
-rw-r--r-- | sys/netinet/libalias/alias.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c index 4a7392865c69..2e469d7e49a4 100644 --- a/sys/netinet/libalias/alias.c +++ b/sys/netinet/libalias/alias.c @@ -762,6 +762,9 @@ UdpAliasIn(struct libalias *la, struct ip *pip) /* Walk out chain. */ error = find_handler(IN, UDP, la, pip, &ad); + /* If we cannot figure out the packet, ignore it. */ + if (error < 0) + return (PKT_ALIAS_IGNORED); /* If UDP checksum is not zero, then adjust since destination port */ /* is being unaliased and destination address is being altered. */ @@ -801,13 +804,7 @@ UdpAliasIn(struct libalias *la, struct ip *pip) &original_address, &pip->ip_dst, 2); pip->ip_dst = original_address; - /* - * If we cannot figure out the packet, ignore it. - */ - if (error < 0) - return (PKT_ALIAS_IGNORED); - else - return (PKT_ALIAS_OK); + return (PKT_ALIAS_OK); } return (PKT_ALIAS_IGNORED); } |