net/ipv4: Introduce IPSKB_FRAG_SEGS bit to inet_skb_parm.flags
This flag indicates whether fragmentation of segments is allowed. Formerly this policy was hardcoded according to IPSKB_FORWARDED (set by either ip_forward or ipmr_forward). Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Cc: Florian Westphal <fw@strlen.de> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
dfa15378bd
commit
359ebda25a
@@ -117,7 +117,7 @@ int ip_forward(struct sk_buff *skb)
|
||||
if (opt->is_strictroute && rt->rt_uses_gateway)
|
||||
goto sr_failed;
|
||||
|
||||
IPCB(skb)->flags |= IPSKB_FORWARDED;
|
||||
IPCB(skb)->flags |= IPSKB_FORWARDED | IPSKB_FRAG_SEGS;
|
||||
mtu = ip_dst_mtu_maybe_forward(&rt->dst, true);
|
||||
if (ip_exceeds_mtu(skb, mtu)) {
|
||||
IP_INC_STATS(net, IPSTATS_MIB_FRAGFAILS);
|
||||
|
Reference in New Issue
Block a user