[PATCH 1/2] ip nexthop: Add space to display properly when showing a group

2019-08-09 Thread Donald Sharp
/44/45/46/47/48/49/50/51/52/53/54/55/56/57/58/59/60/61/62/63/64/65/66/67/68/69/70/71/72/73/74 proto zebra Signed-off-by: Donald Sharp --- ip/ipnexthop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ip/ipnexthop.c b/ip/ipnexthop.c index 97f09e74..f35aab52 100644 --- a/ip/ipnexthop.c +++ b

[PATCH 0/2] iproute2: Improve usability of `ip nexthop`

2019-08-09 Thread Donald Sharp
First patch fixes a spacing issue and the second patch allows the user to filter on the specificed protocol. Donald Sharp (2): ip nexthop: Add space to display properly when showing a group ip nexthop: Allow flush|list operations to specify a specific protocol ip/ipnexthop.c | 17

[PATCH 2/2] ip nexthop: Allow flush|list operations to specify a specific protocol

2019-08-09 Thread Donald Sharp
In the case where we have a large number of nexthops from a specific protocol, allow the flush and list operations to take a protocol to limit the commands scopes. Signed-off-by: Donald Sharp --- ip/ipnexthop.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a

[PATCH net] net: Properly update v4 routes with v6 nexthop

2019-08-30 Thread Donald Sharp
show default via 10.0.2.2 dev eth0 4.5.6.7 nhid 1 via inet6 fe80::9 dev eth0 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 $ Fixes: dcb1ecb50edf (“ipv4: Prepare for fib6_nh from a nexthop object”) Signed-off-by: Donald Sharp --- include/net/ip_fib.h | 4 ++-- include/net/nexthop.h

[PATCH v2 net] net: Properly update v4 routes with v6 nexthop

2019-08-31 Thread Donald Sharp
show default via 10.0.2.2 dev eth0 4.5.6.7 nhid 1 via inet6 fe80::9 dev eth0 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 $ v2: Addresses code review comments from David Ahern Fixes: dcb1ecb50edf (“ipv4: Prepare for fib6_nh from a nexthop object”) Signed-off-by: Donald Sharp

[PATCH] doc: Update VRF documentation metric

2017-10-18 Thread Donald Sharp
Two things: 1) Update examples to show usage of metric 2) Discuss reasoning for using such a high metric. Signed-off-by: Donald Sharp --- Documentation/networking/vrf.txt | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/vrf.txt b

[PATCH] net: fib_rules: Add new attribute to set protocol

2018-02-23 Thread Donald Sharp
returned 0 in notifications. To avoid incompatibility with existing iproute2, send the protocol as a new attribute. Fixes: cac56209a66 ("net: Allow a rule to track originating protocol") Signed-off-by: Donald Sharp --- drivers/net/vrf.c | 5 - include/net/fib

[PATCH iproute2 v2] ip: Properly display AF_BRIDGE address information for neighbor events

2018-02-23 Thread Donald Sharp
"???" was being printed. Add code to properly display this data when requested. Signed-off-by: Donald Sharp --- lib/utils.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/lib/utils.c b/lib/utils.c index 24aeddd8..fe5841f6 100644 --- a/lib/utils.c +++ b/l

[PATCH v3 iproute2-next 0/3] Allow 'ip rule' command to use protocol

2018-02-23 Thread Donald Sharp
Fix iprule.c to use the actual `struct fib_rule_hdr` and to allow the end user to see and use the protocol keyword for rule manipulation. v2: Rearrange and code changes as per David Ahern v3: Fix some missed RTN_XXX to appropriate FR_XX and doc changes Donald Sharp (3): ip: Use the `struct

[PATCH v3 iproute2-next 2/3] ip: Display ip rule protocol used

2018-02-23 Thread Donald Sharp
Modify 'ip rule' command to notice when the kernel passes to us the originating protocol. Add code to allow the `ip rule flush protocol XXX` command to be accepted and properly handled. Modify the documentation to reflect these code changes. Signed-off-by: Donald Sharp --- i

[PATCH v3 iproute2-next 3/3] ip: Allow rules to accept a specified protocol

2018-02-23 Thread Donald Sharp
Allow the specification of a protocol when the user adds/modifies/deletes a rule. Signed-off-by: Donald Sharp --- ip/iprule.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ip/iprule.c b/ip/iprule.c index 17df9e9b..796da3b3 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -689,6 +689,12

[PATCH v3 iproute2-next 1/3] ip: Use the `struct fib_rule_hdr` for rules

2018-02-23 Thread Donald Sharp
e iprule.c use the correct one. Additionally copy over the modified fib_rules.h file Signed-off-by: Donald Sharp --- include/uapi/linux/fib_rules.h | 1 + ip/iprule.c| 128 + 2 files changed, 68 insertions(+), 61 deletions(-) di

[PATCH v4 iproute2-next 2/3] ip: Display ip rule protocol used

2018-02-28 Thread Donald Sharp
Modify 'ip rule' command to notice when the kernel passes to us the originating protocol. Add code to allow the `ip rule flush protocol XXX` command to be accepted and properly handled. Modify the documentation to reflect these code changes. Signed-off-by: Donald Sharp --- i

[PATCH v4 iproute2-next 0/3] Allow 'ip rule' command to use protocol

2018-02-28 Thread Donald Sharp
e' no parameters and doc changes Donald Sharp (3): ip: Use the `struct fib_rule_hdr` for rules ip: Display ip rule protocol used ip: Allow rules to accept a specified protocol include/uapi/linux/fib_rules.h | 1 + ip/iprule.c

[PATCH v4 iproute2-next 1/3] ip: Use the `struct fib_rule_hdr` for rules

2018-02-28 Thread Donald Sharp
e iprule.c use the correct one. Additionally copy over the modified fib_rules.h file Signed-off-by: Donald Sharp --- include/uapi/linux/fib_rules.h | 1 + ip/iprule.c| 128 + 2 files changed, 68 insertions(+), 61 deletions(-) di

[PATCH v4 iproute2-next 3/3] ip: Allow rules to accept a specified protocol

2018-02-28 Thread Donald Sharp
Allow the specification of a protocol when the user adds/modifies/deletes a rule. Signed-off-by: Donald Sharp --- ip/iprule.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ip/iprule.c b/ip/iprule.c index 8120520e..6fdc9b5e 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -697,6

[PATCH] rtnetlink: Add more well known protocol values

2018-05-25 Thread Donald Sharp
FRRouting installs routes into the kernel associated with the originating protocol. Add these values to the well known values in rtnetlink.h. Signed-off-by: Donald Sharp --- include/uapi/linux/rtnetlink.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/rtnetlink.h b

[PATCH] rtnetlink: Add more well known protocol values

2018-05-30 Thread Donald Sharp
FRRouting installs routes into the kernel associated with the originating protocol. Add these values to the well known values in rtnetlink.h. Signed-off-by: Donald Sharp --- v2: Fixed whitespace issues include/uapi/linux/rtnetlink.h | 5 + 1 file changed, 5 insertions(+) diff --git a

Re: [PATCH] rtnetlink: Add more well known protocol values

2018-05-30 Thread Donald Sharp
This patch is intended for net-next. thanks! donald On Wed, May 30, 2018 at 8:27 AM, Donald Sharp wrote: > FRRouting installs routes into the kernel associated with > the originating protocol. Add these values to the well > known values in rtnetlink.h. > > Signed-off-b

[PATCH 2/2] iproute2: Remove leftover gated RT_PROT defines

2018-06-08 Thread Donald Sharp
These values are not being used nor maintained, so remove. Signed-off-by: Donald Sharp --- etc/iproute2/rt_protos | 13 - 1 file changed, 13 deletions(-) diff --git a/etc/iproute2/rt_protos b/etc/iproute2/rt_protos index 3ffe8a6c..a965ad16 100644 --- a/etc/iproute2/rt_protos +++ b

[PATCH 0/2] Addition of new routing protocols for iproute2

2018-06-08 Thread Donald Sharp
The linux kernel recently accepted some new RTPROT values for some fairly standard routing protocols. This commit brings in support for iproute2 to handle these new values. Additionally clean up some long standing cruft in etc/iproute2/rt_protos Donald Sharp (2): iproute2: Add support for a

[PATCH 1/2] iproute2: Add support for a few routing protocols

2018-06-08 Thread Donald Sharp
Add support for: BGP ISIS OSPF RIP EIGRP Routing protocols to iproute2. Signed-off-by: Donald Sharp --- etc/iproute2/rt_protos| 5 + include/linux/rtnetlink.h | 5 + lib/rt_names.c| 5 + 3 files changed, 15 insertions(+) diff --git a/etc/iproute2/rt_protos b/etc

[PATCH v2 0/1] Addition of new routing protocols for iproute2

2018-06-08 Thread Donald Sharp
The linux kernel recently accepted some new RTPROT values for some fairly standard routing protocols. This commit brings in support for iproute2 to handle these new values. v2 - Update to latest version of master which has rtnetlink.h code and drop of work already done. Donald Sharp (1

[PATCH v2 1/1] iproute2: Add support for a few routing protocols

2018-06-08 Thread Donald Sharp
Add support for: BGP ISIS OSPF RIP EIGRP Routing protocols to iproute2. Signed-off-by: Donald Sharp --- v2: Update to latest version of code. etc/iproute2/rt_protos | 5 + lib/rt_names.c | 5 + 2 files changed, 10 insertions(+) diff --git a/etc/iproute2/rt_protos b/etc

Re: [PATCH iproute2] lib: ignore invalid mounts in cg_init_map

2020-10-08 Thread Donald Sharp
ill be shown as "unreachable:cgroup_id". Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions") Signed-off-by: Dmitry Yakunin Reported-by: Donald Sharp --- lib/cg_map.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

AF_UNIX sockets crossing namespace based boundaries

2019-01-01 Thread Donald Sharp
I have created multiple namespaces: sharpd@robot /v/l/frr> ip netns list two (id: 2) one (id: 1) EVA (id: 0) And am running a process in namespace two that creates a named socket `/var/log/frr/run/zserv.api`: sharpd@robot ~/frr> sudo ip netns exec two /usr/lib/frr/zebra -N two --daemon -A 127.0.

Re: AF_UNIX sockets crossing namespace based boundaries

2019-01-02 Thread Donald Sharp
Is this the behavior we actually want? On Wed, Jan 2, 2019 at 9:05 AM Andrew Lunn wrote: > > On Tue, Jan 01, 2019 at 07:46:07PM -0500, Donald Sharp wrote: > > I have created multiple namespaces: > > > > sharpd@robot /v/l/frr> ip netns list > > two (id: 2) > >

[PATCH] nexthop: Fix Deletion display

2020-05-30 Thread Donald Sharp
Actually display that deletions are happening when monitoring nexthops. Signed-off-by: Donald Sharp --- ip/ipnexthop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipnexthop.c b/ip/ipnexthop.c index 99f89630..c33cef0c 100644 --- a/ip/ipnexthop.c +++ b/ip/ipnexthop.c

[PATCH v3 net] net: Properly update v4 routes with v6 nexthop

2019-09-04 Thread Donald Sharp
show default via 10.0.2.2 dev eth0 4.5.6.7 nhid 1 via inet6 fe80::9 dev eth0 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 $ v2, v3: Addresses code review comments from David Ahern Fixes: dcb1ecb50edf (“ipv4: Prepare for fib6_nh from a nexthop object”) Signed-off-by: Donald Sharp

[PATCH] selftests: Add test cases for `ip nexthop flush proto XX`

2019-09-16 Thread Donald Sharp
Add some test cases to allow the fib_nexthops.sh test code to test the flushing of nexthops based upon the proto passed in upon creation of the nexthop group. Signed-off-by: Donald Sharp --- tools/testing/selftests/net/fib_nexthops.sh | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH] net: ipmr: Add ipmr_rtm_getroute

2017-06-28 Thread Donald Sharp
sting process. Signed-off-by: Donald Sharp --- net/ipv4/ipmr.c | 63 - 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index a1d521b..bb909f1 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -2

[PATCH 0/2] Allow rules to track originating protocol

2018-02-17 Thread Donald Sharp
Add the ability for the kernel to track the originating protocol for when new rules are added to the kernel. Donald Sharp (2): net: Allow a rule to track originating protocol drivers: Modify vrf device to specify it's rule as RTPROT_KERNEL drivers/net/vrf.c | 1 + includ

[PATCH 1/2] net: Allow a rule to track originating protocol

2018-02-17 Thread Donald Sharp
igned-off-by: Donald Sharp --- include/net/fib_rules.h| 3 ++- include/uapi/linux/fib_rules.h | 2 +- net/core/fib_rules.c | 7 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 648caf90ec07..b166ef07e6d4 1

[PATCH 2/2] drivers: Modify vrf device to specify it's rule as RTPROT_KERNEL

2018-02-17 Thread Donald Sharp
Allow the vrf device to specify that the kernel is the originator of the rule created for this device. Signed-off-by: Donald Sharp --- drivers/net/vrf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 139c61c8244a..ec6d2d623b60 100644 --- a

[PATCH 1/3] ip: Use the `struct fib_rule_hdr` for rules

2018-02-17 Thread Donald Sharp
e iprule.c use the correct one. Additionally copy over the modified fib_rules.h file Signed-off-by: Donald Sharp --- include/linux/fib_rules.h | 2 +- ip/iprule.c | 105 -- 2 files changed, 56 insertions(+), 51 deletions(-) diff --git

[PATCH 0/3] Allow 'ip rule' command to use protocol

2018-02-17 Thread Donald Sharp
Fix iprule.c to use the actual `struct fib_rule_hdr` and to allow the end user to see and use the protocol keyword for rule manipulations. Donald Sharp (3): ip: Use the `struct fib_rule_hdr` for rules ip: Display ip rule protocol used ip: Allow rules to accept a specified protocol include

[PATCH 2/3] ip: Display ip rule protocol used

2018-02-17 Thread Donald Sharp
Newer kernels are now accepting a protocol from the installing program for who installed the rule. This change allows us to see this change if it is being specified by the installing program. Signed-off-by: Donald Sharp --- ip/iprule.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ip

[PATCH 3/3] ip: Allow rules to accept a specified protocol

2018-02-17 Thread Donald Sharp
Allow the specification of a protocol when the user adds/modifies/deletes a rule. Signed-off-by: Donald Sharp --- ip/iprule.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ip/iprule.c b/ip/iprule.c index 5703d6e4..8fc6ac48 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -324,6 +324,12

Re: [PATCH 0/3] Allow 'ip rule' command to use protocol

2018-02-17 Thread Donald Sharp
Got it. I'll send an update. donald On Sat, Feb 17, 2018 at 6:35 PM, David Ahern wrote: > On 2/17/18 5:47 AM, Donald Sharp wrote: >> Fix iprule.c to use the actual `struct fib_rule_hdr` and to >> allow the end user to see and use the protocol keyword >> for rule m

[PATCH net-next v2 1/1] net: Allow a rule to track originating protocol

2018-02-20 Thread Donald Sharp
w the vrf device to specify that the kernel is the originator of the rule created for this device. Signed-off-by: Donald Sharp --- drivers/net/vrf.c | 1 + include/net/fib_rules.h| 3 ++- include/uapi/linux/fib_rules.h | 2 +- net/core/fib_rules.c | 7 ++- 4

[PATCH net-next v2 0/1] Allow rules to track originating protocol

2018-02-20 Thread Donald Sharp
Add the ability for the kernel to track the originating protocol for when new rules are added to the kernel. --- v1->v2 -> Address comments by David Miller to collapse patches into 1. Donald Sharp (1): net: Allow a rule to track originating protocol drivers/net/vrf.c

[PATCH iproute2-next 4/4] ip: Add ability to flush a rule based upon protocol

2018-02-20 Thread Donald Sharp
Add code to allow the `ip rule flush protocol XXX` command to be accepted and properly handled. Additionally modify the documentation to be correct with these changes. Signed-off-by: Donald Sharp --- ip/iprule.c| 25 ++--- man/man8/ip-rule.8 | 18

[PATCH iproute2-next 1/4] ip: Use the `struct fib_rule_hdr` for rules

2018-02-20 Thread Donald Sharp
e iprule.c use the correct one. Additionally copy over the modified fib_rules.h file Signed-off-by: Donald Sharp --- include/uapi/linux/fib_rules.h | 2 +- ip/iprule.c| 132 ++--- 2 files changed, 72 insertions(+), 62 deletions(-) di

[PATCH iproute2-next 2/4] ip: Display ip rule protocol used

2018-02-20 Thread Donald Sharp
Newer kernels are now accepting a protocol from the installing program for who installed the rule. This change allows us to see this change if it is being specified by the installing program. Signed-off-by: Donald Sharp --- ip/iprule.c | 4 1 file changed, 4 insertions(+) diff --git a/ip

[PATCH iproute2-next 3/4] ip: Allow rules to accept a specified protocol

2018-02-20 Thread Donald Sharp
Allow the specification of a protocol when the user adds/modifies/deletes a rule. Signed-off-by: Donald Sharp --- ip/iprule.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ip/iprule.c b/ip/iprule.c index b3e7d92c..fd242fee 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -675,6 +675,12

[PATCH iproute2-next 0/4] Allow 'ip rule' command to use protocol

2018-02-20 Thread Donald Sharp
Fix iprule.c to use the actual `struct fib_rule_hdr` and to allow the end user to see and use the protocol keyword for rule manipulations. Donald Sharp (4): ip: Use the `struct fib_rule_hdr` for rules ip: Display ip rule protocol used ip: Allow rules to accept a specified protocol ip: Add

[PATCH v2 iproute2-next 3/3] ip: Allow rules to accept a specified protocol

2018-02-21 Thread Donald Sharp
Allow the specification of a protocol when the user adds/modifies/deletes a rule. Signed-off-by: Donald Sharp --- ip/iprule.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ip/iprule.c b/ip/iprule.c index 39008768..192fe215 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -683,6 +683,12

[PATCH v2 iproute2-next 1/3] ip: Use the `struct fib_rule_hdr` for rules

2018-02-21 Thread Donald Sharp
e iprule.c use the correct one. Additionally copy over the modified fib_rules.h file Signed-off-by: Donald Sharp --- include/uapi/linux/fib_rules.h | 2 +- ip/iprule.c| 129 ++--- 2 files changed, 69 insertions(+), 62 deletions(-) di

[PATCH v2 iproute2-next 2/3] ip: Display ip rule protocol used

2018-02-21 Thread Donald Sharp
Modify 'ip rule' command to notice when the kernel passes to us the originating protocol. Add code to allow the `ip rule flush protocol XXX` command to be accepted and properly handled. Modify the documentation to reflect these code changes. Signed-off-by: Donald Sharp --- i

[PATCH v2 iproute2-next 0/3] Allow 'ip rule' command to use protocol

2018-02-21 Thread Donald Sharp
Fix iprule.c to use the actual `struct fib_rule_hdr` and to allow the end user to see and use the protocol keyword for rule manipulations. v2: Rearrange and code changes as per David Ahern Donald Sharp (3): ip: Use the `struct fib_rule_hdr` for rules ip: Display ip rule protocol used ip

[PATCH iproute2] ip: Properly display AF_BRIDGE address information for neighbor events

2018-02-21 Thread Donald Sharp
"???" was being printed. Add code to properly display this data when requested. Signed-off-by: Donald Sharp --- lib/utils.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/lib/utils.c b/lib/utils.c index 24aeddd8..e01e18a7 100644 --- a/lib/utils.c +++ b/l

[PATCH] Fix some mroute forwarding issues in vrf's

2017-06-09 Thread Donald Sharp
correct incoming device for a vrf scenario, before calling ip_mr_forward. Fix this by resolving to the correct interface and calling ip_mr_forward with the result. Signed-off-by: Donald Sharp --- net/ipv4/ipmr.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff

[PATCH net v2] net: ipmr: Fix some mroute forwarding issues in vrf's

2017-06-09 Thread Donald Sharp
correct incoming device for a vrf scenario, before calling ip_mr_forward. Fix this by resolving to the correct interface and calling ip_mr_forward with the result. Signed-off-by: Donald Sharp --- v2: Fixed title net/ipv4/ipmr.c | 27 ++- 1 file changed, 18 insertions(+), 9

Re: [PATCH net v2] net: ipmr: Fix some mroute forwarding issues in vrf's

2017-06-09 Thread Donald Sharp
I'll change it over to this way. No problem. donald On Fri, Jun 9, 2017 at 10:54 AM, David Ahern wrote: > On 6/9/17 8:22 AM, Donald Sharp wrote: >> @@ -988,7 +988,16 @@ static void ipmr_cache_resolve(struct net *net, struct >> mr_table *mrt, >> >>

[PATCH net v3] net: ipmr: Fix some mroute forwarding issues in vrf's

2017-06-10 Thread Donald Sharp
correct incoming device for a vrf scenario, before calling ip_mr_forward. Fix this by resolving to the correct interface and calling ip_mr_forward with the result. Fixes: e58e41596811 ("net: Enable support for VRF with ipv4 multicast") Signed-off-by: Donald Sharp --- v2: Fixed title v3: Addres

Re: ipmr: MFC routes when VIF deleted

2017-06-11 Thread Donald Sharp
I would argue that this is just an unintended side effect of the original implementation. Shuffling interface vif's seems like a good way to churn a significant number of mroutes to me. If you want to use a interface it probably is going to be already be configured with it's own vif, and as such

[PATCH iproute2] ip: mroute: Add table output to show command

2017-06-14 Thread Donald Sharp
Follow the convention established by 'ip route show table 0' for when to display Signed-off-by: Donald Sharp --- ip/ipmroute.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ip/ipmroute.c b/ip/ipmroute.c index 4d2d758..70f4c4f 100644 --- a/ip/ipmroute.c +++ b/ip/ipmroute.c @@ -