lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 27 Jun 2016 09:13:37 +0800 From: 严海双 <yanhaishuang@...s.chinamobile.com> To: zhuyj <zyjzyj2000@...il.com> Cc: "David S. Miller" <davem@...emloft.net>, Jesse Gross <jesse@...nel.org>, Pravin B Shelar <pshelar@...ira.com>, Tom Herbert <tom@...bertland.com>, netdev <netdev@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] geneve: fix max_mtu setting > On Jun 26, 2016, at 8:35 PM, zhuyj <zyjzyj2000@...il.com> wrote: > > + if (geneve->remote.sa.sa_family == AF_INET) > + max_mtu -= sizeof(struct iphdr); > + else > + max_mtu -= sizeof(struct ipv6hdr); > > Sorry, if sa_family is not AF_NET, it is AF_INET6? > > There is a lot of macros in include/linux/socket.h. > > Zhu Yanjun > There are only two enumerations AF_INET and AF_INET6 have been assigned in geneve_newlink: if (data[IFLA_GENEVE_REMOTE] && data[IFLA_GENEVE_REMOTE6]) return -EINVAL; if (data[IFLA_GENEVE_REMOTE]) { remote.sa.sa_family = AF_INET; remote.sin.sin_addr.s_addr = nla_get_in_addr(data[IFLA_GENEVE_REMOTE]); } if (data[IFLA_GENEVE_REMOTE6]) { if (!IS_ENABLED(CONFIG_IPV6)) return -EPFNOSUPPORT; remote.sa.sa_family = AF_INET6; remote.sin6.sin6_addr = nla_get_in6_addr(data[IFLA_GENEVE_REMOTE6]); if (ipv6_addr_type(&remote.sin6.sin6_addr) & IPV6_ADDR_LINKLOCAL) { netdev_dbg(dev, "link-local remote is unsupported\n"); return -EINVAL; } } So I think the else case is for AF_INET6 only.
Powered by blists - more mailing lists