[PATCH iproute2] lib: suppress error msg when filling the cache

2019-05-24 Thread Nicolas Dichtel
those error messages. Fixes: 55870dfe7f8b ("Improve batch and dump times by caching link lookups") Reported-by: Philippe Guibert Signed-off-by: Nicolas Dichtel --- lib/ll_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ll_map.c b/lib/ll_map.c index 2d7b65dcb8f

Re: [PATCH] netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression

2019-05-28 Thread Nicolas Dichtel
Le 24/05/2019 à 11:22, Pablo Neira Ayuso a écrit : > On Mon, May 20, 2019 at 10:35:07AM +0200, Nicolas Dichtel wrote: >> Le 06/05/2019 à 15:16, Pablo Neira Ayuso a écrit : >>> On Mon, May 06, 2019 at 10:49:52AM +0200, Nicolas Dichtel wrote: >> [snip] >>>> Is

[PATCH iproute2] iplink: don't try to get ll addr len when creating an iface

2019-05-29 Thread Nicolas Dichtel
It will obviously fail. This is a follow up of the commit 757837230a65 ("lib: suppress error msg when filling the cache"). Suggested-by: David Ahern Signed-off-by: Nicolas Dichtel --- ip/iplink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ip/iplink.c b/i

Re: [RFC][PATCH kernel_bpf] honor CAP_NET_ADMIN for BPF_PROG_LOAD

2019-06-03 Thread Nicolas Dichtel
Le 28/05/2019 à 18:53, Andreas Steinmetz a écrit : > [sorry for crossposting but this affects both lists] > > BPF_PROG_TYPE_SCHED_CLS and BPF_PROG_TYPE_XDP should be allowed > for CAP_NET_ADMIN capability. Nearly everything one can do with > these program types can be done some other way with CAP_

Re: [RFC][PATCH kernel_bpf] honor CAP_NET_ADMIN for BPF_PROG_LOAD

2019-06-05 Thread Nicolas Dichtel
Le 05/06/2019 à 12:59, Andreas Steinmetz a écrit : [snip] > If there is a change for this to get accepted, sure, I'm willing to > submit this formally (need some advice, though). At least, you need to submit it without the RFC tag. RFC patches are not aimed to be merged. Regards, Nicolas

Re: [PATCH net 2/2] ipv6: fix EFAULT on sendto with icmpv6 and hdrincl

2019-06-06 Thread Nicolas Dichtel
v twice after > raw_probe_proto_opt""), but at that time it was not a problem because > IPV6_HDRINCL was not yet introduced. > > Only eat these 2 bytes if hdrincl == 0. > > Fixes: 715f504b1189 ("ipv6: add IPV6_HDRINCL option for raw sockets") > Signed-off-by: Olivier Matz Acked-by: Nicolas Dichtel

Re: [PATCH ipsec 0/2] xfrm interface: bug fix on changelink

2019-07-15 Thread Nicolas Dichtel
Le 10/07/2019 à 09:45, Nicolas Dichtel a écrit : > > Here are two bug fix seen by code review. The first one avoids a corruption of > existing xfrm interfaces and the second is a minor fix of an error message. > > include/net/xfrm.h| 1 - > net/xfrm/xfr

Re: [PATCH ipsec] xfrm interface: fix list corruption for x-netns

2019-07-15 Thread Nicolas Dichtel
Le 10/07/2019 à 15:11, Nicolas Dichtel a écrit : > dev_net(dev) is the netns of the device and xi->net is the link netns, > where the device has been linked. > changelink() must operate in the link netns to avoid a corruption of > the xfrm lists. > > Note that xi->net and

[PATCH ipsec v2 0/4] xfrm interface: bugs fixes

2019-07-15 Thread Nicolas Dichtel
Here is a bunch of bugs fixes. Some have been seen by code review and some when playing with x-netns. The details are in each patch. v1 -> v2: - add patch #3 and #4 include/net/xfrm.h| 2 -- net/xfrm/xfrm_interface.c | 56 +-- 2 files chang

[PATCH ipsec v2 4/4] xfrm interface: fix management of phydev

2019-07-15 Thread Nicolas Dichtel
ifindex. Not that the side effect, is that the phydev is now optional. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Nicolas Dichtel Tested-by: Julien Floret --- include/net/xfrm.h| 1 - net/xfrm/xfrm_interface.c | 32 +--

[PATCH ipsec v2 3/4] xfrm interface: fix list corruption for x-netns

2019-07-15 Thread Nicolas Dichtel
ts may be corrupted and can later trigger a kernel panic. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Reported-by: Julien Floret Signed-off-by: Nicolas Dichtel Tested-by: Julien Floret --- net/xfrm/xfrm_interface.c | 8 1 file changed, 4 insertions(+), 4 deletio

[PATCH ipsec v2 2/4] xfrm interface: ifname may be wrong in logs

2019-07-15 Thread Nicolas Dichtel
The ifname is copied when the interface is created, but is never updated later. In fact, this property is used only in one error message, where the netdevice pointer is available, thus let's use it. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by:

[PATCH ipsec v2 1/4] xfrm interface: avoid corruption on changelink

2019-07-15 Thread Nicolas Dichtel
gso_max_size 65536 gso_max_segs 65535 => "if_id 0x2" Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Nicolas Dichtel Tested-by: Julien Floret --- net/xfrm/xfrm_interface.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [PATCH net] net: sit: unregister_netdevice on newlink's error path

2021-01-14 Thread Nicolas Dichtel
thetic (ipip6_tunnel_update_6rd() returns a negative value or 0). With or without this: Acked-by: Nicolas Dichtel > + unregister_netdevice_queue(dev, NULL); > + } > #endif > > return err; >

Re: [PATCH net-next 3/3] net: core: Namespace-ify sysctl_rmem_max and sysctl_wmem_max

2021-01-20 Thread Nicolas Dichtel
Le 20/01/2021 à 14:28, Menglong Dong a écrit : [snip] >>> For that reason, make sysctl_wmem_max and sysctl_rmem_max >>> per-namespace. >> >> I think having those values be restricted by init netns is a desirable >> property. > > I just thought that having these values per-namespace can be more fle

Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-10 Thread Nicolas Dichtel
Le 09/12/2020 à 15:40, Eyal Birger a écrit : > Hi Phil, > > On Tue, Dec 8, 2020 at 8:51 PM Phil Sutter wrote: >> >> Hi Eyal, >> >> On Tue, Dec 08, 2020 at 04:47:02PM +0200, Eyal Birger wrote: >>> On Mon, Dec 7, 2020 at 4:07 PM Phil Sutter wrote: [snip] >> >> The packet appears twice being sent t

Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-10 Thread Nicolas Dichtel
Le 10/12/2020 à 12:48, Eyal Birger a écrit : > Hi Nicolas, Hi Eyal, > > On Thu, Dec 10, 2020 at 1:10 PM Nicolas Dichtel > wrote: [snip] > I also think they should be consistent. But it'd still be confusing to me > to get an OUTPUT hook on the inner packet in the forward

Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-08 Thread Nicolas Dichtel
Le 07/12/2020 à 14:43, Phil Sutter a écrit : > With an IPsec tunnel without dedicated interface, netfilter sees locally > generated packets twice as they exit the physical interface: Once as "the > inner packet" with IPsec context attached and once as the encrypted > (ESP) packet. > > With xfrm_in

Re: [PATCH v2] xfrm: interface: Don't hide plain packets from netfilter

2020-12-08 Thread Nicolas Dichtel
Le 08/12/2020 à 15:00, Phil Sutter a écrit : > Hi Nicolas, > > On Tue, Dec 08, 2020 at 10:02:16AM +0100, Nicolas Dichtel wrote: >> Le 07/12/2020 à 14:43, Phil Sutter a écrit : > [...] >>> diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c >>>

Re: [PATCH net-next] net-loopback: allow lo dev initial state to be controlled

2020-11-18 Thread Nicolas Dichtel
Le 18/11/2020 à 02:12, David Ahern a écrit : [snip] > If there is no harm in just creating lo in the up state, why not just do > it vs relying on a sysctl? It only affects 'local' networking so no real > impact to containers that do not do networking (ie., packets can't > escape). Linux has a lot o

Re: [PATCH net-next] net-loopback: allow lo dev initial state to be controlled

2020-11-19 Thread Nicolas Dichtel
Le 18/11/2020 à 18:39, Mahesh Bandewar (महेश बंडेवार) a écrit : > On Wed, Nov 18, 2020 at 8:58 AM Nicolas Dichtel > wrote: >> >> Le 18/11/2020 à 02:12, David Ahern a écrit : >> [snip] >>> If there is no harm in just creating lo in the up state, why not just do

[PATCH net] doc: move seg6_flowlabel to seg6-sysctl.rst

2021-04-14 Thread Nicolas Dichtel
Let's have all seg6 sysctl at the same place. Fixes: a6dc6670cd7e ("ipv6: sr: Add documentation for seg_flowlabel sysctl") Signed-off-by: Nicolas Dichtel --- Documentation/networking/ip-sysctl.rst | 15 --- Documentation/networking/seg6-sysctl.rst | 13 +++

[PATCH net] vrf: fix a comment about loopback device

2021-04-14 Thread Nicolas Dichtel
This is a leftover of the below commit. Fixes: 4f04256c983a ("net: vrf: Drop local rtable and rt6_info") Signed-off-by: Nicolas Dichtel --- drivers/net/vrf.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index cd

Re: [PATCH net-next v2 0/3] bonding: 3ad: support for 200G/400G ports and more verbose warning

2021-02-11 Thread Nicolas Dichtel
gt; bonding: 3ad: Print an error for unknown speeds > > Nikolay Aleksandrov (2): > bonding: 3ad: add support for 200G speed > bonding: 3ad: add support for 400G speed > > drivers/net/bonding/bond_3ad.c | 26 ++ > 1 file changed, 22 insertions(+), 4 deletions(-) > Acked-by: Nicolas Dichtel

Re: [PATCH ipsec-next v2] xfrm: add /proc/sys/core/net/xfrm_redact_secret

2020-08-20 Thread Nicolas Dichtel
Le 20/08/2020 à 14:04, Antony Antony a écrit : [snip] > @@ -38,6 +48,15 @@ static struct ctl_table xfrm_table[] = { > .mode = 0644, > .proc_handler = proc_dointvec > }, > + { > + .procname = "xfrm_redact_secret", > + .m

[PATCH ipsec] xfrm: fix sa selector validation

2019-06-14 Thread Nicolas Dichtel
c73e6 96 flag align4 In fact, the selector is not mandatory, allow the user to provide an empty selector. Fixes: b38ff4075a80 ("xfrm: Fix xfrm sel prefix length validation") CC: Anirudh Gupta Signed-off-by: Nicolas Dichtel --- net/xfrm/xfrm_user.c | 3 +++ 1 file changed, 3 insert

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-14 Thread Nicolas Dichtel
Le 05/06/2019 à 23:08, Lucas Bates a écrit : > Apologies for the delay in getting this out. I've been busy > with other things and this change was a little trickier than > I expected. > > This patch restores the original behaviour for tdc prior to the > introduction of the plugin system, where the

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-18 Thread Nicolas Dichtel
Le 17/06/2019 à 04:04, Lucas Bates a écrit : > On Fri, Jun 14, 2019 at 5:37 AM Nicolas Dichtel > wrote: [snip] > The tests that make use of DEV2 are intended to be run with a physical > NIC. This feature was originally submitted by Chris Mi from Mellanox > back in 2017 (comm

[PATCH net] ipv6: fix neighbour resolution with raw socket

2019-06-20 Thread Nicolas Dichtel
eway, which is :: because the associated route is a connected route, thus it uses the dst addr of the packet. Let's use rt6_nexthop() to choose the right nh. Note that rt and in6addr_any are const in ip6_dst_lookup_neigh(), thus let's constify rt6_nexthop() to avoid ugly cast. Signed-off-by:

Re: [PATCH net] ipv6: fix neighbour resolution with raw socket

2019-06-20 Thread Nicolas Dichtel
Le 20/06/2019 à 17:12, David Ahern a écrit : > On 6/20/19 6:34 AM, Nicolas Dichtel wrote: >> The scenario is the following: the user uses a raw socket to send an ipv6 >> packet, destinated to a not-connected network, and specify a connected nh. >> Here is the correspon

Re: [RFC PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-21 Thread Nicolas Dichtel
Le 21/06/2019 à 02:45, Lucas Bates a écrit : [snip] > Very true. I think I just put that one in quickly and meant to come > back to it later, but either way it's a bit too vague. I understand. As a developer, we tend to focus on the technical part, but we need to remember to look at the big picture

Re: [PATCH net] ipv6: fix neighbour resolution with raw socket

2019-06-21 Thread Nicolas Dichtel
Le 20/06/2019 à 18:36, David Ahern a écrit : [snip] > You don't have a fixes tag, but this should go to stable releases. Yeah, I was not able to point a specific commit. The bug is reproducible with a 4.4 from ubuntu-16.04, with a 3.10 from redhat-7 but not with a vanilla 3.10.20.

[PATCH iproute2] ip monitor: display interfaces from all groups

2019-06-21 Thread Nicolas Dichtel
Only interface from group 0 were displayed. ip monitor calls ipaddr_reset_filter() and there is no reason to not reset the filter group in this function. Fixes: c4fdf75d3def ("ip link: fix display of interface groups") Signed-off-by: Nicolas Dichtel --- ip/ipaddress.c | 2 +- 1 file

[PATCH net v2 0/2] ipv6: fix neighbour resolution with raw socket

2019-06-24 Thread Nicolas Dichtel
The first patch prepares the fix, it constify rt6_nexthop(). The detail of the bug is explained in the second patch. v1 -> v2: - fix compilation warnings - split the initial patch drivers/net/vrf.c| 2 +- include/net/ip6_route.h | 4 ++-- net/bluetooth/6lowpan.c

[PATCH net v2 1/2] ipv6: constify rt6_nexthop()

2019-06-24 Thread Nicolas Dichtel
There is no functional change in this patch, it only prepares the next one. rt6_nexthop() will be used by ip6_dst_lookup_neigh(), which uses const variables. Signed-off-by: Nicolas Dichtel --- drivers/net/vrf.c| 2 +- include/net/ip6_route.h | 4 ++-- net/bluetooth

[PATCH net v2 2/2] ipv6: fix neighbour resolution with raw socket

2019-06-24 Thread Nicolas Dichtel
eway, which is :: because the associated route is a connected route, thus it uses the dst addr of the packet. Let's use rt6_nexthop() to choose the right nh. Signed-off-by: Nicolas Dichtel --- net/ipv6/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/

Re: [PATCH net v2 1/2] ipv6: constify rt6_nexthop()

2019-06-24 Thread Nicolas Dichtel
Le 24/06/2019 à 19:37, Nick Desaulniers a écrit : [snip] > > The author stated that this patch was no functional change. Nicolas, > it can be helpful to include compiler warnings in the commit message > when sending warning fixes, but it's not a big deal. Thanks for > sending the patches. > Yep

Re: [PATCH net-next 1/1] tc-testing: Restore original behaviour for namespaces in tdc

2019-06-25 Thread Nicolas Dichtel
eractions: > > "plugins": { > "requires": "buildebpfPlugin" > }, > > A test case can have more than one required plugin: a list > can be inserted as the value for 'requires'. > > Signed-off-by: Lucas Bates T

[PATCH net-next] fib_rules: rename FRA_PROTOCOL to FRA_ORIGINATOR

2018-03-20 Thread Nicolas Dichtel
As the comment said, this attribute defines the originator of the rule, it's not really a (network) protocol. Let's rename it accordingly to avoid confusion (difference between FRA_PROTOCOL and FRA_IP_PROTO was not obvious). CC: Donald Sharp Signed-off-by: Nicolas Dichtel --- FR

Re: [PATCH net-next] fib_rules: rename FRA_PROTOCOL to FRA_ORIGINATOR

2018-03-21 Thread Nicolas Dichtel
Le 20/03/2018 à 18:27, David Ahern a écrit : > On 3/20/18 11:04 AM, Nicolas Dichtel wrote: >> As the comment said, this attribute defines the originator of the rule, >> it's not really a (network) protocol. >> Let's rename it accordingly to avoid confusion (differe

Re: [PATCH net-next] fib_rules: rename FRA_PROTOCOL to FRA_ORIGINATOR

2018-03-21 Thread Nicolas Dichtel
Le 21/03/2018 à 16:15, David Miller a écrit : > From: David Ahern > Date: Wed, 21 Mar 2018 09:00:09 -0600 > >> The rule->proto value is not used as a selector. It is passed in, stored >> on a rule and returned to userspace. It is book keeping only so an admin >> has some idea of which program ins

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-06-27 Thread Nicolas Dichtel
Le 26/06/2019 à 21:03, Alexander Aring a écrit : > This patch adds a state file for each generated namespace to ensure the > namespace is mounted. There exists no way to tell another programm that > the namespace is mounted when iproute is creating one. An example > application would be an inotify

Re: [RFC iproute2 1/1] ip: netns: add mounted state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 28/06/2019 à 18:26, David Howells a écrit : > Nicolas Dichtel wrote: > >> David Howells was working on a mount notification mechanism: >> https://lwn.net/Articles/760714/ >> https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=notifications &g

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 30/06/2019 à 21:29, Matteo Croce a écrit : > When ip creates a netns, there is a small time interval between the > placeholder file creation in NETNS_RUN_DIR and the bind mount from /proc. > > Add a temporary file named .mounting-$netns which gets deleted after the > bind mount, so watching for

Re: [RFC iproute2] netns: add mounting state file for each netns

2019-07-01 Thread Nicolas Dichtel
Le 01/07/2019 à 15:50, Matteo Croce a écrit : > On Mon, Jul 1, 2019 at 2:38 PM Nicolas Dichtel > wrote: >> >> Le 30/06/2019 à 21:29, Matteo Croce a écrit : >>> When ip creates a netns, there is a small time interval between the >>> placeholder file creation

[PATCH ipsec] xfrm interface: fix memory leak on creation

2019-07-02 Thread Nicolas Dichtel
lassert CC: Shannon Nelson CC: Antony Antony CC: Eyal Birger Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Reported-by: Julien Floret Signed-off-by: Nicolas Dichtel --- net/xfrm/xfrm_interface.c | 98 +++ 1 file changed, 28 insertions(+),

[PATCH ipsec v2] xfrm interface: fix memory leak on creation

2019-07-02 Thread Nicolas Dichtel
CC: Shannon Nelson CC: Antony Antony CC: Eyal Birger Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Reported-by: Julien Floret Signed-off-by: Nicolas Dichtel --- v1 -> v2: - fix typos in commit log net/xfrm/xfrm_interface.c | 98 +++

Re: [PATCH ipsec v2] xfrm interface: fix memory leak on creation

2019-07-04 Thread Nicolas Dichtel
Le 04/07/2019 à 12:22, Steffen Klassert a écrit : [snip] > > Applied, thanks a lot! > I suppose that this patch will be queued for stable trees? Regards, Nicolas

[PATCH ipsec 2/2] xfrm interface: ifname may be wrong in logs

2019-07-10 Thread Nicolas Dichtel
The ifname is copied when the interface is created, but is never updated later. In fact, this property is used only in one error message, where the netdevice pointer is available, thus let's use it. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by:

[PATCH ipsec 1/2] xfrm interface: avoid corruption on changelink

2019-07-10 Thread Nicolas Dichtel
gso_max_size 65536 gso_max_segs 65535 => "if_id 0x2" Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Signed-off-by: Nicolas Dichtel --- net/xfrm/xfrm_interface.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/xfrm/xfrm

[PATCH ipsec 0/2] xfrm interface: bug fix on changelink

2019-07-10 Thread Nicolas Dichtel
Here are two bug fix seen by code review. The first one avoids a corruption of existing xfrm interfaces and the second is a minor fix of an error message. include/net/xfrm.h| 1 - net/xfrm/xfrm_interface.c | 20 ++-- 2 files changed, 6 insertions(+), 15 deletions(-) Re

[PATCH ipsec] xfrm interface: fix list corruption for x-netns

2019-07-10 Thread Nicolas Dichtel
ts may be corrupted and can later trigger a kernel panic. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Reported-by: Julien Floret Signed-off-by: Nicolas Dichtel Tested-by: Julien Floret --- net/xfrm/xfrm_interface.c | 8 1 file changed, 4 insertions(+), 4 deletio

Re: [PATCH v2 bpf-next 1/3] capability: introduce CAP_BPF and CAP_TRACING

2019-08-29 Thread Nicolas Dichtel
Le 29/08/2019 à 07:12, Alexei Starovoitov a écrit : [snip] > CAP_BPF and CAP_NET_ADMIN together allow the following: > - Attach to cgroup-bpf hooks and query > - skb, xdp, flow_dissector test_run command > > CAP_NET_ADMIN allows: > - Attach networking bpf programs to xdp, tc, lwt, flow dissector I

Re: [PATCH v2 bpf-next 2/3] bpf: implement CAP_BPF

2019-08-30 Thread Nicolas Dichtel
Le 29/08/2019 à 19:30, Alexei Starovoitov a écrit : [snip] > These are the links that showing that k8 can delegates caps. > Are you saying that you know of folks who specifically > delegate cap_sys_admin and cap_net_admin _only_ to a container to run bpf in > there? > Yes, we need cap_sys_admin o

Re: [PATCH net] tc-testing: don't hardcode 'ip' in nsPlugin.py

2019-08-30 Thread Nicolas Dichtel
2638 - Add matchall and try to get it > > Fixes: 489ce2f42514 ("tc-testing: Restore original behaviour for namespaces > in tdc") > Reported-by: Hangbin Liu > Signed-off-by: Davide Caratti Acked-by: Nicolas Dichtel

Re: [PATCH net v2] af_packet: fix raw sockets over 6in4 tunnel

2019-02-25 Thread Nicolas Dichtel
Le 23/02/2019 à 00:53, Willem de Bruijn a écrit : > On Fri, Feb 22, 2019 at 2:50 PM David Miller wrote: >> >> From: Willem de Bruijn >> Date: Wed, 20 Feb 2019 13:39:23 -0500 >> >>> On Mon, Feb 18, 2019 at 1:50 PM Sasha Levin wrote: Should this go to -stable as well? The patch it fixes is in

[PATCH net] gre: fix kernel panic when using lw tunnel

2019-03-06 Thread Nicolas Dichtel
b)->ops points to ovs_dst_ops. Don't try to do anything in one of those cases. Fixes: 962924fa2b7a ("ip_gre: Refactor collect metatdata mode tunnel xmit to ip_md_tunnel_xmit") CC: wenxu Signed-off-by: Nicolas Dichtel --- net/ipv4/ip_tunnel.c | 6 ++ 1 file changed, 6 inse

Re: [PATCH net] gre: fix kernel panic when using lw tunnel

2019-03-06 Thread Nicolas Dichtel
Le 06/03/2019 à 11:32, Nicolas Dichtel a écrit : > There was several problems: > - skb_dst(skb) can be NULL when the packet comes from a gretap tunnel; > - skb_dst(skb)->ops may point to md_dst_ops, which doesn't set ->mtu >handler, thus calling dst_mtu() leads to a pa

Re: [PATCH net] iptunnel: NULL pointer deref for ip_md_tunnel_xmit

2019-03-06 Thread Nicolas Dichtel
dst_ops.mtu 0xa0193800 > mtu = 0x0 > crash> > > I confirmed that the dst entry also has dst->input set to > dst_md_discard, so it looks like it's an entry that's been > initialized via __metadata_dst_init alright. > > I think the fix here is to u

Re: [PATCH net] ip6: fix skb leak in ip6frag_expire_frag_queue()

2019-05-03 Thread Nicolas Dichtel
Le 03/05/2019 à 13:47, Eric Dumazet a écrit : > Since ip6frag_expire_frag_queue() now pulls the head skb > from frag queue, we should no longer use skb_get(), since > this leads to an skb leak. > > Stefan Bader initially reported a problem in 4.4.stable [1] caused > by the skb_get(), so this patch

Re: [PATCH net] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
ute. Good catch. > > Analyzed-by: Dan Winship > Fixes: a54acb3a6f85 ("dev: introduce dev_get_iflink()") I don't agree with the Fixes tag. The test 'iflink != ifindex' is here at least since the beginning of the git history. > Signed-off-by: Sabrina Dubroca Acked-by: Nicolas Dichtel

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
Le 13/05/2019 à 15:47, Sabrina Dubroca a écrit : > Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when > iflink == ifindex. > > In some cases, a device can be created in a different netns with the > same ifindex as its parent. That device will not dump its IFLA_LINK > attribute, w

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
Le 13/05/2019 à 17:08, Sabrina Dubroca a écrit : > 2019-05-13, 16:50:51 +0200, Nicolas Dichtel wrote: >> Le 13/05/2019 à 15:47, Sabrina Dubroca a écrit : >>> Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when >>> iflink == ifindex. >>> &

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-13 Thread Nicolas Dichtel
; >> Thanks to Dan Winship for analyzing the original OpenShift bug down to >> the missing netlink attribute. >> >> Analyzed-by: Dan Winship >> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") >> Signed-off-by: Sabrina Dubroca >> Acked-by: Nicolas Dichtel >&g

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-14 Thread Nicolas Dichtel
Le 13/05/2019 à 23:46, Sabrina Dubroca a écrit : > 2019-05-13, 17:13:36 +0200, Nicolas Dichtel wrote: >> Le 13/05/2019 à 17:08, Sabrina Dubroca a écrit : >>> 2019-05-13, 16:50:51 +0200, Nicolas Dichtel wrote: >>>> Le 13/05/2019 à 15:47, Sabrina Dubroca a écrit : &

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-14 Thread Nicolas Dichtel
Le 14/05/2019 à 10:01, Sabrina Dubroca a écrit : > 2019-05-14, 09:32:32 +0200, Nicolas Dichtel wrote: [snip] >> What about this one? >> Fixes: d8a5ec672768 ("[NET]: netlink support for moving devices between >> network >> namespaces.") > > Nice. Now

Re: [PATCH net v2] rtnetlink: always put ILFA_LINK for links with a link-netnsid

2019-05-14 Thread Nicolas Dichtel
Le 14/05/2019 à 12:24, Sabrina Dubroca a écrit : [snip] > Yes, that's possible although quite unlikely. I'll go with d8a5ec672768. > Agreed. Thank you, Nicolas

Re: [PATCH] netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression

2019-05-20 Thread Nicolas Dichtel
Le 06/05/2019 à 15:16, Pablo Neira Ayuso a écrit : > On Mon, May 06, 2019 at 10:49:52AM +0200, Nicolas Dichtel wrote: [snip] >> Is it possible to queue this for stable? > > Sure, as soon as this hits Linus' tree. > FYI, it's now in Linus tree: https://git.kernel.

Re: [PATCH] net: vxlan: disallow removing to other namespace

2019-05-21 Thread Nicolas Dichtel
Le 21/05/2019 à 07:53, Tonghao Zhang a écrit : [snip] > The problem is that we create one vxlan netdevice(e.g dstport 4789 and > external), and move it to > one net-namespace, and then we hope create one again(dstport 4789 and > external) and move it to other net-namespace, but we can't create it.

[PATCH net] net: enable interface alias removal via rtnl

2017-10-05 Thread Nicolas Dichtel
given alias") Reported-by: Julien FLoret Signed-off-by: Nicolas Dichtel --- net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index d4bcdcc68e92..570092cee902 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlin

Re: [PATCH net] net: enable interface alias removal via rtnl

2017-10-09 Thread Nicolas Dichtel
Le 06/10/2017 à 22:10, Oliver Hartkopp a écrit : > > > On 10/06/2017 08:18 PM, David Ahern wrote: >> On 10/5/17 4:19 AM, Nicolas Dichtel wrote: >>> IFLA_IFALIAS is defined as NLA_STRING. It means that the minimal length of >>> the attribute is 1 ("\0").

Re: [PATCH net] net: enable interface alias removal via rtnl

2017-10-09 Thread Nicolas Dichtel
Le 09/10/2017 à 16:02, David Ahern a écrit : > On 10/9/17 2:23 AM, Nicolas Dichtel wrote: >> Le 06/10/2017 à 22:10, Oliver Hartkopp a écrit : >>> >>> >>> On 10/06/2017 08:18 PM, David Ahern wrote: >>>> On 10/5/17 4:19 AM, Nicolas Dichtel wrote: >&

[PATCH net v2] net: enable interface alias removal via rtnl

2017-10-10 Thread Nicolas Dichtel
given alias") Reported-by: Julien FLoret Signed-off-by: Nicolas Dichtel --- v1 -> v2: add the comment net/core/rtnetlink.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index d4bcdcc68e92..5343565d88b7 100644 --- a

Re: [PATCH net v2] net: enable interface alias removal via rtnl

2017-10-11 Thread Nicolas Dichtel
Le 10/10/2017 à 16:50, David Ahern a écrit : > On 10/10/17 6:41 AM, Nicolas Dichtel wrote: >> IFLA_IFALIAS is defined as NLA_STRING. It means that the minimal length of >> the attribute is 1 ("\0"). However, to remove an alias, the attribute >> length must be 0 (se

[PATCH net v3] net: enable interface alias removal via rtnl

2017-10-11 Thread Nicolas Dichtel
ifalias on empty given alias") Reported-by: Julien FLoret Signed-off-by: Nicolas Dichtel --- David A., I hope that it is now clear and that a v4 will not be needed for a so trivial patch. v2 -> v3: reword the commit log v1 -> v2: add the comment net/core/rtnetlink.c | 5 - 1

Re: [PATCH net 5/6] rtnetlink: check DO_SETLINK_NOTIFY correctly in do_setlink

2017-10-16 Thread Nicolas Dichtel
>> This would avoid lots of duplicated notifications when setting some >> properties of a link. >> >> Fixes: ba9989069f4e ("rtnl/do_setlink(): notify when a netdev is modified") >> Signed-off-by: Xin Long Good catch, thank you. Acked-by: Nicolas Dichtel

[PATCH net] netlink: avoid a double skb free in genlmsg_mcast()

2018-03-14 Thread Nicolas Dichtel
nlmsg_multicast() consumes always the skb, thus the original skb must be freed only when this function is called with a clone. Fixes: cb9f7a9a5c96 ("netlink: ensure to loop over all netns in genlmsg_multicast_allns()") Reported-by: Ben Hutchings Signed-off-by: Nicolas Dichtel --- n

Re: [PATCH v4 1/2] expose stack entry function

2017-09-28 Thread Nicolas Dichtel
Le 28/09/2017 à 11:34, Amine Kherbouche a écrit : > Exporting mpls_forward() function to be able to be called from elsewhere > such as MPLSoverGRE in the next commit. I'm nitpicking, but the commit title is too generic. What about something like 'mpls: export mpls_forward()'? When parsing history

Re: cross namespace interface notification for tun devices

2017-10-02 Thread Nicolas Dichtel
Le 18/09/2017 à 20:47, Jason A. Donenfeld a écrit : > Hey guys, > > It's possible to create a tun device in a process in namespace A and > then move that interface to namespace B. The controlling process in A > needs to receive notifications on when the interface is brought up or > down. It can re

Re: cross namespace interface notification for tun devices

2017-10-02 Thread Nicolas Dichtel
Le 02/10/2017 à 13:11, Jason A. Donenfeld a écrit : > On Mon, Oct 2, 2017 at 11:32 AM, Nicolas Dichtel > wrote: >> 1. Move the process to netns B, open the netlink socket and move back the >> process to netns A. The socket will remain in netns B and you will receive >>

[PATCH net-next] dev: advertise the new nsid when the netns iface changes

2017-10-03 Thread Nicolas Dichtel
terface is unregistered, the new nsid is advertised. If the interface is a x-netns interface (ie rtnl_link_ops->get_link_net is defined), the nsid is allocated if needed. CC: Jason A. Donenfeld Signed-off-by: Nicolas Dichtel --- include/linux/rtnetlink.h| 4 +++- include/uapi/linux/i

Re: [PATCH net 1/2] selftests: pmtu: maximum MTU for vti4 is 2^16-1-20

2018-08-30 Thread Nicolas Dichtel
> Fixes: 82612de1c98e ("ip_tunnel: restore binding to ifaces with a large mtu") > Signed-off-by: Sabrina Dubroca > Acked-by: Stefano Brivio Thanks for fixing this. Acked-by: Nicolas Dichtel

Re: [PATCH] net: Fix double free and memory corruption in get_net_ns_by_id()

2017-12-20 Thread Nicolas Dichtel
net2id_alloc(), which requires > check for net::count under nsid_lock and maybe_get_net(peer), but > in current stable kernel it's used under rtnl_lock() and it has to be > safe. Openswitch begun to use peernet2id_alloc(), and possibly it should > be fixed too. While this is not in

Re: [PATCH net] rtnetlink: fix struct net reference leak

2017-12-22 Thread Nicolas Dichtel
Le 21/12/2017 à 23:18, Craig Gallek a écrit : > From: Craig Gallek > > The below referenced commit extended the RTM_GETLINK interface to > allow querying by netns id. The netnsid property was previously > defined as a signed integer, but this patch assumes that the user > always passes a positiv

Re: [PATCH net v2] netns, rtnetlink: fix struct net reference leak

2017-12-23 Thread Nicolas Dichtel
e ("rtnl: allow to create device with IFLA_LINK_NETNSID > set") > Fixes: 79e1ad148c84 ("rtnetlink: use netnsid to query interface") > CC: Jiri Benc > CC: Nicolas Dichtel > CC: Jason A. Donenfeld > Signed-off-by: Craig Gallek > --- > net/core/net_nam

Re: [PATCH 2/2] Revert "xfrm: Fix stack-out-of-bounds read in xfrm_state_find."

2018-01-05 Thread Nicolas Dichtel
Le 23/12/2017 à 17:09, Steffen Klassert a écrit : > On Sat, Dec 23, 2017 at 10:56:12AM -0500, David Miller wrote: >> From: Steffen Klassert >> Date: Sat, 23 Dec 2017 10:22:17 +0100 >> >>> On Thu, Nov 16, 2017 at 11:00:40AM +0100, Steffen Klassert wrote: This reverts commit c9f3f813d462c72dbe4

Re: [PATCH 2/2] Revert "xfrm: Fix stack-out-of-bounds read in xfrm_state_find."

2018-01-08 Thread Nicolas Dichtel
Le 05/01/2018 à 18:17, David Miller a écrit : [snip] > I will in my next batch of stable submissions. > Thank you!

[PATCH net 1/2] ip_tunnel: restore binding to ifaces with a large mtu

2018-05-30 Thread Nicolas Dichtel
f interface. CC: Petr Machata CC: Ido Schimmel Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/commit/?id=e5afd356a411a Fixes: f6cc9c054e77 ("ip_tunnel: Emit events for post-register MTU changes") Signed-off-by: Nicolas Dichtel --- net/ipv4/ip_tunnel.

[PATCH net 2/2] ip6_tunnel: remove magic mtu value 0xFFF8

2018-05-30 Thread Nicolas Dichtel
I don't know where this value comes from (probably a copy and paste and paste and paste ...). Let's use standard values which are a bit greater. Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/commit/?id=e5afd356a411a Signed-off-by: Nicolas Dichtel ---

[PATCH net 0/2] ip[6] tunnels: fix mtu calculations

2018-05-30 Thread Nicolas Dichtel
The first patch restores the possibility to bind an ip4 tunnel to an interface whith a large mtu. The second patch was spotted after the first fix. I also target it to net because it fixes the max mtu value that can be used for ipv6 tunnels. net/ipv4/ip_tunnel.c | 6 +++--- net/ipv6/ip6_tunne

Re: [PATCH net 1/2] ip_tunnel: restore binding to ifaces with a large mtu

2018-05-31 Thread Nicolas Dichtel
Le 30/05/2018 à 22:29, Ido Schimmel a écrit : [snip] > There is another instance of this magic number in the file, but it's > written in lower case so you might have missed it - see > ip_tunnel_newlink(). Can you please take care of it in v2? Good catch, thank you. Will send a v2.

[PATCH net v2 0/2] ip[6] tunnels: fix mtu calculations

2018-05-31 Thread Nicolas Dichtel
The first patch restores the possibility to bind an ip4 tunnel to an interface whith a large mtu. The second patch was spotted after the first fix. I also target it to net because it fixes the max mtu value that can be used for ipv6 tunnels. v2: remove the 0xfff8 in ip_tunnel_newlink() net/ipv

[PATCH net v2 1/2] ip_tunnel: restore binding to ifaces with a large mtu

2018-05-31 Thread Nicolas Dichtel
f interface. CC: Petr Machata CC: Ido Schimmel Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/commit/?id=e5afd356a411a Fixes: f6cc9c054e77 ("ip_tunnel: Emit events for post-register MTU changes") Signed-off-by: Nicolas Dichtel Reviewed-by: Ido Schimmel

[PATCH net v2 2/2] ip6_tunnel: remove magic mtu value 0xFFF8

2018-05-31 Thread Nicolas Dichtel
I don't know where this value comes from (probably a copy and paste and paste and paste ...). Let's use standard values which are a bit greater. Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/netdev-vger-cvs.git/commit/?id=e5afd356a411a Signed-off-by: Nicolas Dichtel ---

[PATCH iproute2] ip: IFLA_NEW_NETNSID/IFLA_NEW_IFINDEX support

2018-05-31 Thread Nicolas Dichtel
Parse and display those attributes. Example: ip l a type dummy ip netns add foo ip monitor link& ip l s dummy1 netns foo Deleted 6: dummy1: mtu 1500 qdisc noop state DOWN group default link/ether 66:af:3a:3f:a0:89 brd ff:ff:ff:ff:ff:ff new-nsid 0 new-ifindex 6 Signed-off-by: Nicolas Dic

Re: [PATCH iproute2] ip: IFLA_NEW_NETNSID/IFLA_NEW_IFINDEX support

2018-05-31 Thread Nicolas Dichtel
Oops, I use an old email for Stephen, sorry. Regards, Nicolas Le 31/05/2018 à 16:28, Nicolas Dichtel a écrit : > Parse and display those attributes. > Example: > ip l a type dummy > ip netns add foo > ip monitor link& > ip l s dummy1 netns foo > Deleted 6: dummy1:

Re: [PATCH iproute2] ip: IFLA_NEW_NETNSID/IFLA_NEW_IFINDEX support

2018-05-31 Thread Nicolas Dichtel
Le 31/05/2018 à 17:46, Stephen Hemminger a écrit : > On Thu, 31 May 2018 16:28:48 +0200 [snip] > This makes sense. All of linkinfo that is present should be displayed. > > Both netns and ifindex are really unsigned values. Use __u32 and print_uint. Ok. > Also why not convert numeric values to nam

Re: [PATCH iproute2] ip: IFLA_NEW_NETNSID/IFLA_NEW_IFINDEX support

2018-06-01 Thread Nicolas Dichtel
Le 31/05/2018 à 17:51, Nicolas Dichtel a écrit : > Le 31/05/2018 à 17:46, Stephen Hemminger a écrit : >> On Thu, 31 May 2018 16:28:48 +0200 > [snip] >> This makes sense. All of linkinfo that is present should be displayed. >> >> Both netns and ifindex are really

Re: [PATCH net v2 0/2] ip[6] tunnels: fix mtu calculations

2018-06-04 Thread Nicolas Dichtel
Le 01/06/2018 à 19:57, David Miller a écrit : [snip] > I think the 0xfff8 value might come from the requirement that ipv6 > fragments need to be a multiple of 8 bytes long. > Oh, thanks for the explanation!

[PATCH iproute2 0/2] display netns name instead of nsid

2018-06-04 Thread Nicolas Dichtel
[PATCH iproute2 0/2] display netns name instead of nsid After these patches, the iproute2 name of netns is displayed instead of the nsid. It's easier to read/understand. ip/ip_common.h | 3 +++ ip/ipaddress.c | 23 ++- ip/iplink.c| 18 -- ip/ipnetns.c

  1   2   3   4   5   6   7   >