mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-01 02:33:57 +00:00
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 <linmiaohe@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4d4dce31ef
commit
cbc08a3312
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user