* [PATCH 1/1] neighbour : fix ndm_type type error issue @ 2014-07-25 16:38 Jun Zhao 2014-07-25 23:21 ` Cong Wang ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Jun Zhao @ 2014-07-25 16:38 UTC (permalink / raw) To: David S. Miller, Cong Wang, Pravin B Shelar, Nicolas Dichtel, stephen hemminger, Tom Herbert, netdev, Francesco Fusco, Veaceslav Falico, Duan Jiong, Hannes Frederic Sowa, Jiri Pirko, David Stevens, Or Gerlitz, Daniel Borkmann Cc: linux-kernel, Jun Zhao ndm_type means L3 address type, in neighbour proxy and vxlan, it's RTN_UNICAST. NDA_DST is for netlink TLV type, hence it's not right value in this context. Signed-off-by: Jun Zhao <mypopydev@gmail.com> --- drivers/net/vxlan.c | 2 +- net/core/neighbour.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index d3f3e5d..1fb7b37 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -340,7 +340,7 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan, ndm->ndm_state = fdb->state; ndm->ndm_ifindex = vxlan->dev->ifindex; ndm->ndm_flags = fdb->flags; - ndm->ndm_type = NDA_DST; + ndm->ndm_type = RTN_UNICAST; if (send_eth && nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->eth_addr)) goto nla_put_failure; diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 559890b..ef31fef 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -2249,7 +2249,7 @@ static int pneigh_fill_info(struct sk_buff *skb, struct pneigh_entry *pn, ndm->ndm_pad1 = 0; ndm->ndm_pad2 = 0; ndm->ndm_flags = pn->flags | NTF_PROXY; - ndm->ndm_type = NDA_DST; + ndm->ndm_type = RTN_UNICAST; ndm->ndm_ifindex = pn->dev->ifindex; ndm->ndm_state = NUD_NONE; -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] neighbour : fix ndm_type type error issue 2014-07-25 16:38 [PATCH 1/1] neighbour : fix ndm_type type error issue Jun Zhao @ 2014-07-25 23:21 ` Cong Wang 2014-07-25 23:24 ` Hannes Frederic Sowa 2014-07-29 0:52 ` David Miller 2 siblings, 0 replies; 7+ messages in thread From: Cong Wang @ 2014-07-25 23:21 UTC (permalink / raw) To: Jun Zhao Cc: David S. Miller, Pravin B Shelar, Nicolas Dichtel, stephen hemminger, Tom Herbert, netdev, Francesco Fusco, Veaceslav Falico, Duan Jiong, Hannes Frederic Sowa, Jiri Pirko, David Stevens, Or Gerlitz, Daniel Borkmann, linux-kernel@vger.kernel.org On Fri, Jul 25, 2014 at 9:38 AM, Jun Zhao <mypopydev@gmail.com> wrote: > ndm_type means L3 address type, in neighbour proxy and vxlan, it's RTN_UNICAST. > NDA_DST is for netlink TLV type, hence it's not right value in this context. > Looks correct to me, at least libnl uses RTN_* for ndm_type. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] neighbour : fix ndm_type type error issue 2014-07-25 16:38 [PATCH 1/1] neighbour : fix ndm_type type error issue Jun Zhao 2014-07-25 23:21 ` Cong Wang @ 2014-07-25 23:24 ` Hannes Frederic Sowa 2014-07-26 0:29 ` Jun Zhao 2014-07-29 0:52 ` David Miller 2 siblings, 1 reply; 7+ messages in thread From: Hannes Frederic Sowa @ 2014-07-25 23:24 UTC (permalink / raw) To: Jun Zhao, David S. Miller, Cong Wang, Pravin B Shelar, Nicolas Dichtel, stephen hemminger, Tom Herbert, netdev, Francesco Fusco, Veaceslav Falico, Duan Jiong, Jiri Pirko, David Stevens, Or Gerlitz, Daniel Borkmann Cc: linux-kernel On Fri, Jul 25, 2014, at 18:38, Jun Zhao wrote: > ndm_type means L3 address type, in neighbour proxy and vxlan, it's > RTN_UNICAST. > NDA_DST is for netlink TLV type, hence it's not right value in this > context. The value of NDA_DST == RTN_UNICAST, otherwise we couldn't do this change as it would alter e.g. arpd behavior. Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Thanks, Hannes ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] neighbour : fix ndm_type type error issue 2014-07-25 23:24 ` Hannes Frederic Sowa @ 2014-07-26 0:29 ` Jun Zhao 2014-07-26 13:42 ` Hannes Frederic Sowa 0 siblings, 1 reply; 7+ messages in thread From: Jun Zhao @ 2014-07-26 0:29 UTC (permalink / raw) To: Hannes Frederic Sowa Cc: David S. Miller, Cong Wang, Pravin B Shelar, Nicolas Dichtel, stephen hemminger, Tom Herbert, netdev, Francesco Fusco, Veaceslav Falico, Duan Jiong, Jiri Pirko, David Stevens, Or Gerlitz, Daniel Borkmann, linux-kernel On Sat, 2014-07-26 at 01:24 +0200, Hannes Frederic Sowa wrote: > On Fri, Jul 25, 2014, at 18:38, Jun Zhao wrote: > > ndm_type means L3 address type, in neighbour proxy and vxlan, it's > > RTN_UNICAST. > > NDA_DST is for netlink TLV type, hence it's not right value in this > > context. > > The value of NDA_DST == RTN_UNICAST, otherwise we couldn't do this > change as it would alter e.g. arpd behavior. > > Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> > > Thanks, > Hannes But I think NDA_DST/RTN_UNICAST have different means in this context, even though the value of NDA_DST == RTN_UNICAST. For arp proxy/NDP proxy context, ndm_type means the peer L3 address, so RTN_UNICAST is the right value. For vxlan have similar semantic for remote ip. BTW: In the source code, implicit think NDA_DST == RTN_UNICAST maybe not a good idea when we don't have a comment or the other explain. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] neighbour : fix ndm_type type error issue 2014-07-26 0:29 ` Jun Zhao @ 2014-07-26 13:42 ` Hannes Frederic Sowa 2014-07-26 15:05 ` Jun Zhao 0 siblings, 1 reply; 7+ messages in thread From: Hannes Frederic Sowa @ 2014-07-26 13:42 UTC (permalink / raw) To: Jun Zhao Cc: David S. Miller, Cong Wang, Pravin B Shelar, Nicolas Dichtel, stephen hemminger, Tom Herbert, netdev, Francesco Fusco, Veaceslav Falico, Duan Jiong, Jiri Pirko, David Stevens, Or Gerlitz, Daniel Borkmann, linux-kernel Hi, On Sat, Jul 26, 2014, at 02:29, Jun Zhao wrote: > On Sat, 2014-07-26 at 01:24 +0200, Hannes Frederic Sowa wrote: > > On Fri, Jul 25, 2014, at 18:38, Jun Zhao wrote: > > > ndm_type means L3 address type, in neighbour proxy and vxlan, it's > > > RTN_UNICAST. > > > NDA_DST is for netlink TLV type, hence it's not right value in this > > > context. > > > > The value of NDA_DST == RTN_UNICAST, otherwise we couldn't do this > > change as it would alter e.g. arpd behavior. > > > > Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> > > > > Thanks, > > Hannes > > But I think NDA_DST/RTN_UNICAST have different means in this context, > even though the value of NDA_DST == RTN_UNICAST. > > For arp proxy/NDP proxy context, ndm_type means the peer L3 address, > so RTN_UNICAST is the right value. For vxlan have similar semantic for > remote ip. > > BTW: In the source code, implicit think NDA_DST == RTN_UNICAST maybe > not a good idea when we don't have a comment or the other explain. I am totally with you and think your change is good, that's why I also gave my ack to your patch. My comment above was about my concerns regarding making a user space visible change, which in the end could alter the behavior of already existing software. Developers maybe have debugged code and seen some different value being propagated from the kernel and this software could now break if we would change the value after all those years. Bye, Hannes ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] neighbour : fix ndm_type type error issue 2014-07-26 13:42 ` Hannes Frederic Sowa @ 2014-07-26 15:05 ` Jun Zhao 0 siblings, 0 replies; 7+ messages in thread From: Jun Zhao @ 2014-07-26 15:05 UTC (permalink / raw) To: Hannes Frederic Sowa Cc: David S. Miller, Cong Wang, Pravin B Shelar, Nicolas Dichtel, stephen hemminger, Tom Herbert, netdev, Francesco Fusco, Veaceslav Falico, Duan Jiong, Jiri Pirko, David Stevens, Or Gerlitz, Daniel Borkmann, linux-kernel Hi, Hannes On Sat, 2014-07-26 at 15:42 +0200, Hannes Frederic Sowa wrote: > Hi, > > On Sat, Jul 26, 2014, at 02:29, Jun Zhao wrote: > > On Sat, 2014-07-26 at 01:24 +0200, Hannes Frederic Sowa wrote: > > > On Fri, Jul 25, 2014, at 18:38, Jun Zhao wrote: > > > > ndm_type means L3 address type, in neighbour proxy and vxlan, it's > > > > RTN_UNICAST. > > > > NDA_DST is for netlink TLV type, hence it's not right value in this > > > > context. > > > > > > The value of NDA_DST == RTN_UNICAST, otherwise we couldn't do this > > > change as it would alter e.g. arpd behavior. > > > > > > Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> > > > > > > Thanks, > > > Hannes > > > > But I think NDA_DST/RTN_UNICAST have different means in this context, > > even though the value of NDA_DST == RTN_UNICAST. > > > > For arp proxy/NDP proxy context, ndm_type means the peer L3 address, > > so RTN_UNICAST is the right value. For vxlan have similar semantic for > > remote ip. > > > > BTW: In the source code, implicit think NDA_DST == RTN_UNICAST maybe > > not a good idea when we don't have a comment or the other explain. > > I am totally with you and think your change is good, that's why I also > gave my ack to your patch. > > My comment above was about my concerns regarding making a user space > visible change, which in the end could alter the behavior of already > existing software. > > Developers maybe have debugged code and seen some different value being > propagated from the kernel and this software could now break if we would > change the value after all those years. > > Bye, > Hannes Lucky, NDA_DST == RTN_UNICAST is true really in source code :) /* rtm_type */ enum { RTN_UNSPEC, RTN_UNICAST, ... } enum { NDA_UNSPEC, NDA_DST, ... } ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] neighbour : fix ndm_type type error issue 2014-07-25 16:38 [PATCH 1/1] neighbour : fix ndm_type type error issue Jun Zhao 2014-07-25 23:21 ` Cong Wang 2014-07-25 23:24 ` Hannes Frederic Sowa @ 2014-07-29 0:52 ` David Miller 2 siblings, 0 replies; 7+ messages in thread From: David Miller @ 2014-07-29 0:52 UTC (permalink / raw) To: mypopydev Cc: cwang, pshelar, nicolas.dichtel, stephen, therbert, netdev, ffusco, vfalico, duanj.fnst, hannes, jiri, dlstevens, ogerlitz, dborkman, linux-kernel From: Jun Zhao <mypopydev@gmail.com> Date: Sat, 26 Jul 2014 00:38:59 +0800 > ndm_type means L3 address type, in neighbour proxy and vxlan, it's RTN_UNICAST. > NDA_DST is for netlink TLV type, hence it's not right value in this context. > > Signed-off-by: Jun Zhao <mypopydev@gmail.com> This change is definitely correct, applied, thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-29 0:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-25 16:38 [PATCH 1/1] neighbour : fix ndm_type type error issue Jun Zhao 2014-07-25 23:21 ` Cong Wang 2014-07-25 23:24 ` Hannes Frederic Sowa 2014-07-26 0:29 ` Jun Zhao 2014-07-26 13:42 ` Hannes Frederic Sowa 2014-07-26 15:05 ` Jun Zhao 2014-07-29 0:52 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).