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
@ -762,6 +762,9 @@ UdpAliasIn(struct libalias *la, struct ip *pip)
|
|||||||
|
|
||||||
/* Walk out chain. */
|
/* Walk out chain. */
|
||||||
error = find_handler(IN, UDP, la, pip, &ad);
|
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 */
|
/* If UDP checksum is not zero, then adjust since destination port */
|
||||||
/* is being unaliased and destination address is being altered. */
|
/* 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);
|
&original_address, &pip->ip_dst, 2);
|
||||||
pip->ip_dst = original_address;
|
pip->ip_dst = original_address;
|
||||||
|
|
||||||
/*
|
return (PKT_ALIAS_OK);
|
||||||
* If we cannot figure out the packet, ignore it.
|
|
||||||
*/
|
|
||||||
if (error < 0)
|
|
||||||
return (PKT_ALIAS_IGNORED);
|
|
||||||
else
|
|
||||||
return (PKT_ALIAS_OK);
|
|
||||||
}
|
}
|
||||||
return (PKT_ALIAS_IGNORED);
|
return (PKT_ALIAS_IGNORED);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user