connmark: Fix undefined shift if traffic selector is /0
Same as the previous commit for consistency, but not an issue here as
only transport mode SAs are handled.
Fixes: b8973b2661 ("connmark: Add CONNMARK rules to select correct output SA based on conntrack")
This commit is contained in:
@@ -64,7 +64,7 @@ static bool ts2in(traffic_selector_t *ts,
|
||||
{
|
||||
memcpy(&addr->s_addr, net->get_address(net).ptr, 4);
|
||||
net->destroy(net);
|
||||
mask->s_addr = htonl(0xffffffffU << (32 - bits));
|
||||
mask->s_addr = bits ? htonl(0xffffffffU << (32 - bits)) : 0;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user