mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
What's the point of adjusting a checksum if we are going to toss the
packet? Anticipate the check/return code.
This commit is contained in:
parent
ea80b0ac03
commit
50d25dda1b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190941
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user