summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/libalias/alias.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
index 4a73928..2e469d7 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);
}
OpenPOWER on IntegriCloud