aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2020-08-29 05:09:18 -0400
committerDavid S. Miller <davem@davemloft.net>2020-08-31 12:33:16 -0700
commitcbc08a33126f8f721d30cf9034c4d444b55de60a (patch)
treea2cb4dd60e85416aef3b9617d8d86be523151687 /net/ipv4
parentnet: ethernet: ti: am65-cpts: fix i2083 genf (and estf) Reconfiguration Issue (diff)
downloadlinux-dev-cbc08a33126f8f721d30cf9034c4d444b55de60a.tar.xz
linux-dev-cbc08a33126f8f721d30cf9034c4d444b55de60a.zip
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.c2
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,