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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150918183957.GC18191@tuxdriver.com>
Date:	Fri, 18 Sep 2015 14:39:57 -0400
From:	"John W. Linville" <linville@...driver.com>
To:	Jesse Gross <jesse@...ira.com>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	netdev <netdev@...r.kernel.org>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Pravin B Shelar <pshelar@...ira.com>
Subject: Re: [PATCH] iplink_geneve: add UDP destination port configuration at
 link creation

On Fri, Sep 18, 2015 at 09:15:56AM -0700, Jesse Gross wrote:
> On Fri, Sep 18, 2015 at 7:45 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> > On Fri, 2015-09-18 at 10:26 -0400, John W. Linville wrote:
> >> On Thu, Sep 17, 2015 at 01:49:49PM -0700, Eric Dumazet wrote:
> >> > On Thu, 2015-09-17 at 15:27 -0400, John W. Linville wrote:
> >> > > Signed-off-by: John W. Linville <linville@...driver.com>
> >> > > ---
> >> >
> >> > >  }
> >> > >
> >> > > @@ -150,6 +159,10 @@ static void geneve_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> >> > >           else
> >> > >                   fprintf(f, "tos %#x ", tos);
> >> > >   }
> >> > > +
> >> > > + if (tb[IFLA_GENEVE_PORT])
> >> > > +         fprintf(f, "dstport %u ",
> >> > > +                 ntohs(rta_getattr_u16(tb[IFLA_GENEVE_PORT])));
> >> >
> >> > This looks strange.
> >> >
> >> > Kernel does :
> >> >
> >> > if (nla_put_u16(skb, IFLA_GENEVE_PORT, ntohs(geneve->dst_port)))
> >> >         goto nla_put_failure;
> >>
> >> Indeed, you are right.  I had essentially copied some vxlan code when
> >> I did my version of adding the port attribute, and didn't take much
> >> care when adapting that code for the version that actually got merged.
> >>
> >> The current geneve code is using host byte-order for the UDP port in
> >> the netlink messages.  But, I see that vxlan, gre, iptnl, etc are using
> >> network byte order for specifying UDP ports in their netlink stuff.
> >> Should geneve follow that practice as well?  Or does it matter?
> >
> > It might be too late to change the ABI, as geneve is in linux-4.2
> 
> We might be in luck actually. Geneve itself came earlier but I think
> the ability to specify the dest port is in 4.3 only, so we still have
> a chance to make it consistent.

Right, that's what I was thinking.  So we are agreed to use network
byte order?  I'll be happy to post a patch.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@...driver.com			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ