net: Use helper macro IP_MAX_MTU in __ip_append_data()
Subsystems (3)
PATCH 1/1 net: Use helper macro IP_MAX_MTU in __ip_append_data()
What 0xFFFF means here is actually the max mtu of a ip packet. Use help macro IP_MAX_MTU here.
Signed-off-by Miaohe Lin <[email protected]>
--- net/ipv4/ip_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/ip_output.c +1 -1
@@ -996,7 +996,7 @@ static int __ip_append_data(struct sock *sk, fragheaderlen =sizeof (struct iphdr ) + (opt ? opt->optlen :0 ); maxfraglen = ((mtu - fragheaderlen) & ~7 ) + fragheaderlen; - maxnonfragsize =ip_sk_ignore_df (sk) ?0xFFFF : mtu; + maxnonfragsize =ip_sk_ignore_df (sk) ?IP_MAX_MTU : mtu;if (cork->length + length > maxnonfragsize - fragheaderlen) { ip_local_error(sk, EMSGSIZE, fl4->daddr, inet->inet_dport,
Signature · 1 line
2.19.1
From: Miaohe Lin <[email protected]>
Date: Sat, 29 Aug 2020 05:09:18 -0400
Quoted 4 lines
What
0xFFFFmeans here is actually the max mtu of a ip packet. Use help macroIP_MAX_MTUhere.Signed-off-by Miaohe Lin <[email protected]>
Applied.