diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2020-08-29 12:09:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-31 22:33:16 +0300 |
commit | cbc08a33126f8f721d30cf9034c4d444b55de60a (patch) | |
tree | a2cb4dd60e85416aef3b9617d8d86be523151687 /net/ipv4 | |
parent | 4d4dce31ef1adab72e6a22f0cac179d28c499aad (diff) | |
download | linux-cbc08a33126f8f721d30cf9034c4d444b55de60a.tar.xz |
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 329a0ab87542..f0f234727547 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -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, |