aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/libalias/alias.c
diff options
context:
space:
mode:
authorPaolo Pisati <piso@FreeBSD.org>2009-04-11 15:19:09 +0000
committerPaolo Pisati <piso@FreeBSD.org>2009-04-11 15:19:09 +0000
commitea80b0ac039be76520bfd2a5be9527a4dc68f0d8 (patch)
tree23f80e1c7bdb1ec848c3e19657f655256c68d039 /sys/netinet/libalias/alias.c
parentc4b3a33012efaf83d9a30d6a863c177f7b976f21 (diff)
downloadsrc-ea80b0ac039be76520bfd2a5be9527a4dc68f0d8.tar.gz
src-ea80b0ac039be76520bfd2a5be9527a4dc68f0d8.zip
Plug two bugs introduced with modules conversion:
-UdpAliasIn(): correctly check return code after modules ran. -alias_nbt: in case of malformed packets (or some other unrecoverable error), toss the packet.
Notes
Notes: svn path=/head/; revision=190938
Diffstat (limited to 'sys/netinet/libalias/alias.c')
-rw-r--r--sys/netinet/libalias/alias.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
index c7fc4f437390..4a7392865c69 100644
--- a/sys/netinet/libalias/alias.c
+++ b/sys/netinet/libalias/alias.c
@@ -742,7 +742,7 @@ UdpAliasIn(struct libalias *la, struct ip *pip)
u_short alias_port;
u_short proxy_port;
int accumulate;
- int r = 0, error;
+ int error;
struct alias_data ad = {
.lnk = lnk,
.oaddr = &original_address,
@@ -804,7 +804,7 @@ UdpAliasIn(struct libalias *la, struct ip *pip)
/*
* If we cannot figure out the packet, ignore it.
*/
- if (r < 0)
+ if (error < 0)
return (PKT_ALIAS_IGNORED);
else
return (PKT_ALIAS_OK);