Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
v2: Rebased to kernel/git/davem/net.git
net/core/rtnetlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 5e61456..467a2f4 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnet
> From: Serhey Popovych <serhe.popov...@gmail.com>
> Date: Fri, 16 Jun 2017 15:10:03 +0300
>
>> Now with commit 9c7dafb (net: Allow to create links with
>> given ifindex) support registration of network devices
>> with specific ifindex is added.
>>
>&g
g for throw routes")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
v2: Rebased to kernel/git/davem/net.git repository
Address several scripts/checkpatch.pl issues.
net/ipv6/fib6_rules.c | 22 ++
net/ipv6/ip6_fib.c| 3 +--
2 files changed, 7 insert
> From: Serhey Popovych <serhe.popov...@gmail.com>
> Date: Fri, 16 Jun 2017 15:44:47 +0300
>
>> We should avoid marking goto rules unresolved when their
>> target is actually reachable after rule deletion.
>>
>> Consolder following sample scenario:
>
alid or
name based on rtnl ops kind and random address is used.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
v2: Rebase to kernel/davem/net.git
drivers/net/veth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/veth.c b/drivers/net/ve
alid or
name based on rtnl ops kind and random address is used.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
v3: Really rebase to kernel/davem/net.git
v2: Rebase to kernel/davem/net.git
drivers/net/veth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -
>
>> From: Serhey Popovych <serhe.popov...@gmail.com>
>> Date: Fri, 16 Jun 2017 15:10:03 +0300
>>
>>> Now with commit 9c7dafb (net: Allow to create links with
>>> given ifindex) support registration of network devices
>>> with specific i
>> What do you think?
>
> Passing -1 is an error, it doesn't make sense to try and be
> helpful to buggy userland.
Here is commit I actually change/fix:
commit 9c7dafbfab15 ("net: Allow to create links with given ifindex")
In this change done the opposite: check for ifm->ifi_index moved to
system can continue without network
namespace failed in loopback init path, unless it is
init_net namespace where we panic() anyway.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
drivers/net/loopback.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/d
of first rule with preference 32100 we
mark all goto rules as unreachable, even when rule with
same preference as removed one still present.
Check if next rule with same preference is available
and make all rules with goto action pointing to it.
Signed-off-by: Serhey Popovych <serhe.po
throw route) since we never return
routing table entry with dst.error == -EAGAIN when
CONFIG_IPV6_MULTIPLE_TABLES is on. Also there is no point
to check for RTF_REJECT flag since it is always set throw
route.
Fixes: 73ba57b (ipv6: fix backtracking for throw routes)
Signed-off-by: Serhey Po
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
net/core/rtnetlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 2769ad9..6e4d6c2 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -931,6 +931,7 @@ static
from peer_tb when valid or
name based on rtnl ops kind and random address is used.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
drivers/net/veth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 06894
0x7fff; i++)); do
ifname="dummy$i";
[ ! -d "/sys/class/net/$ifname" ] || continue
ip link add dev "$ifname" index "$i" type dummy
done
* (minor) check for dev->ifindex being greater than zero.
with ifindex == 1 (LOOPBACK_IFINDEX)
in dev_new_index() we should fail and return invalid
index value (0).
Adjust callers to correctly handle error case of dev_new_index().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
net/core/dev.c | 30 ++
1 file c
Interface index is signed integer, we can pass ifm->ifi_index
from userspace via netlink and create network device with
negative ifindex value.
Fixes: 9c7dafbfab15 ("net: Allow to create links with given ifindex")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
There is already check for ifindex being non negative in
register_netdevice(). Do the same here for convenience.
Fixes: e6f8f1a739b6 ("veth: Allow to create peer link with given ifindex")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
drivers/net/veth.c | 2 +-
1
> On Fri, 16 Jun 2017 17:23:52 +0300
> Serhey Popovych <serhe.popov...@gmail.com> wrote:
>
>> If network device indexes exhaust in namespace dev_new_index()
>> can loop indefinitely since there is no condition to exit
>> except case where free index is found.
network device index when it is
smaller than last allocated index in namespace.
This also has positive side effect for equal distribution
of network devices per buckets in index hash table. That
positively affects performance of dev_get_by_index() family.
Signed-off-by: Serhey Popovych <serhe.po
> On Fri, 16 Jun 2017 17:23:51 +0300
> Serhey Popovych <serhe.popov...@gmail.com> wrote:
>
>> Interface index is signed integer, we can pass ifm->ifi_index
>> from userspace via netlink and create network device with
>> negative ifindex value.
>>
>
by putting '\0' not at @len - 1.
Use strnlen() to get length of zero terminated string
and not access beyond @len. Correct comment about @len
and explain how to unset alias (i.e. use zero for @len).
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
net/core/dev.c | 4 +++-
1 file c
additional checks for zero endpoint
in vti6 code. This completes and unifies support for
unconfiguring local/remote endpoint for tunnel.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (3):
ip/tunnel: Use tnl_parse_key() to parse tunnel key
link_ip6tnl
variables from
unsigned integer to __be32 to reflect nature of the
value they store and place error message in
tnl_parse_key() on a single line to make single
call to fprintf().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre.c
.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_vti6.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ip/link_vti6.c b/ip/link_vti6.c
index f631839..4136b0e 100644
--- a/ip/link_vti6.c
+++ b/ip/link_vti6.c
@@ -154,10 +154,8 @@ get_
Use specialized helper to initialize endpoint addresses with
zeros instead of open coding this. This unifies initialization
style with other ipv6 tunnel variants (i.e. gre6 and vti6).
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c |4 ++--
1 file chan
does not exceed IFALIASZ - 1.
3) Drop redundant name parameter length checks in
iplink_vxcan.c and link_veth.c.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (3):
iplink: Improve index parameter handling
iplink: Process "alias"
.
No need to initialize ifi_index with 0 since it is already
initialized at the @struct req initialization time and not
modified in iplink_parse().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/iplink.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --g
Since commit 625df645b703 (Check user supplied interface name lengths)
iplink_parse() validates network device name using check_ifname()
helpers.
Remove redundant "name" length checks from iplink_parse() callers.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
i
Do not stop parameters processing after "alias" parameter: it might
not be a last one. Seems copy pasted from "type" parameter code.
Check it's length does not exceed IFALIASZ - 1. Better we warn
than get RTNL error.
Signed-off-by: Serhey Popovych <serhe.popov...@gmai
duplications.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
lib/ll_map.c | 33 ++---
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/lib/ll_map.c b/lib/ll_map.c
index f65614f..abe7bdc 100644
--- a/lib/ll_map.c
+++ b/lib/ll_map.c
@@ -10,6
/store instructions
on 64/32 bit systems.
Check if IFLA_IFNAME attribute present in netlink message
(should always) and use strncpy() to pad name with zeros.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
lib/ll_map.c | 20
1 file changed, 12 insertions
benefit from compiler call inlining.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (3):
vxcan,veth: Forbid "type" for peer device
utils: ll_map: Update name and type for existing entry
utils: ll_map: Make network device name fixed size
: argument "type" is wrong: not supported for peer
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/iplink_vxcan.c |3 +++
ip/link_veth.c|3 +++
2 files changed, 6 insertions(+)
diff --git a/ip/iplink_vxcan.c b/ip/iplink_vxcan.c
index c13224c..13f2577
Since rtnl_talk() never returns with answer buffer allocated
on error we do not need to release it manually. After this
initializing answer with NULL before rtnl_talk() is useless.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre.c|3 +--
ip/link_gre6.c
default
link/tunnel6 :: brd ::
19: ip6gre0: mtu 1456 qdisc noop state DOWN mode DEFAULT group default
link/gre6 :: brd ::
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
lib/ll_addr.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/ll_ad
with
ll_addr_n2a(): endpoints are IPv6 addresses, not hex
dump.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (2):
utils: ll_addr: Handle ARPHRD_IP6GRE in ll_addr_n2a()
ip/tunnel: No need to free answer after rtnl_talk() on error
ip/link_gre.c|3
It is fully legal to submit zero (INADDR_ANY/IN6ADDR_ANY_INIT)
value for local and/or remote endpoints for all tunnel drivers:
no need additionally check this in userspace.
Note that all tunnel specific code already can pass zero address
to the kernel.
Signed-off-by: Serhey Popovych <serhe.po
it is possible to create tunnel with commands:
ipli add dev ip6gre2 type ip6gre local fe80::1/64 remote fe80::2/64
ip -4 li add dev ip6gre2 type ip6gre local 10.0.0.1/24 remote 10.0.0.2/24
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/ip6tunnel.c |8 ++
Attribute IFLA_GRE_LINK is 32 bit long, not 8 bit.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/link_gre.c b/ip/link_gre.c
index 6f82fb4..09f1e44 100644
--- a/ip/link_gre.c
++
are zero (e.g. INADDR_ANY):
it is fully legal value, accepted by the kernel.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (3):
ip/tunnel: Unify setup and accept zero address for local/remote
endpoints
ip/tunnel: Use get_addr() instead of get_prefix
attribute
is given and IP6_TNL_F_USE_ORIG_FLOWLABEL isn't set.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 15 ---
ip/link_ip6tnl.c | 14 --
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_
With this series I want to improve printing of tclass,
flowlabel and encapsulation limit (encap_limit) options.
Everything within this series is open for your comments,
suggestions and criticism.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (7):
ip6
and check for IFLA_GRE_FLOWINFO attribute presense.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 16 +---
ip/link_ip6tnl.c | 16 +---
2 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
s: 1facc1c61c07 ("ip: link_ip6tnl.c: add json output support")
Fixes: 2e706e12d9b0 ("Merge branch 'master' into net-next")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c |2 +-
ip/link_ip6tnl.c |2 +-
2 files changed, 2 insertions(+), 2
It is implementation internal and main purpose
of printing it seems debugging.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index 8e84ed0..e084975
With this series I want to improve printing of tclass,
flowlabel and encapsulation limit (encap_limit) options.
Everything within this series is open for your comments,
suggestions and criticism.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (7):
ip6
Use %u format specifier to print it in link_gre6.c and
make code more readable.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 11 ---
ip/link_ip6tnl.c | 12 ++--
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/ip/link_
To follow ip6tnl output print flowlabel after tclass
in link_gre6.c.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 8
and check for IFLA_GRE_FLOWINFO attribute presense.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 16 +---
ip/link_ip6tnl.c | 16 +---
2 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
To follow gre6 output print hoplimit before encapsulation
limit in link_ip6tnl.c.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index 3
To follow ip6tnl output print flowlabel after tclass
in link_gre6.c.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 8
attribute
is given and IP6_TNL_F_USE_ORIG_FLOWLABEL isn't set.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 15 ---
ip/link_ip6tnl.c | 14 --
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_
Use %u format specifier to print it in link_gre6.c and
make code more readable.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 11 ---
ip/link_ip6tnl.c | 12 ++--
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/ip/link_
> See individual patch description message for details.
>
> Thanks,
> Serhii
>
> Serhey Popovych (7):
> ip6/tunnel: Fix tclass output
> ip6tnl/tunnel: Do not print obscure flowinfo
> ip6/tunnel: Unify tclass printing
> ip6/tunnel: Unify flowlabel printing
>
It is implementation internal and main purpose
of printing it seems debugging.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index 8e84ed0..e084975
s: 1facc1c61c07 ("ip: link_ip6tnl.c: add json output support")
Fixes: 2e706e12d9b0 ("Merge branch 'master' into net-next")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c |2 +-
ip/link_ip6tnl.c |2 +-
2 files changed, 2 insertions(+), 2
To follow gre6 output print hoplimit before encapsulation
limit in link_ip6tnl.c.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index 3
To follow ip6tnl output print flowlabel after tclass
in link_gre6.c.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 8
attribute
is given and IP6_TNL_F_USE_ORIG_FLOWLABEL isn't set.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 15 ---
ip/link_ip6tnl.c | 14 --
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_
It is implementation internal and main purpose
of printing it seems debugging.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index 8e84ed0..e084975
s: 1facc1c61c07 ("ip: link_ip6tnl.c: add json output support")
Fixes: 2e706e12d9b0 ("Merge branch 'master' into net-next")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c |2 +-
ip/link_ip6tnl.c |2 +-
2 files changed, 2 insertions(+), 2
Stephen Hemminger wrote:
> On Mon, 8 Jan 2018 19:06:31 +0200
> Serhey Popovych <serhe.popov...@gmail.com> wrote:
>
>> With this series I want to improve printing of tclass,
>> flowlabel and encapsulation limit (encap_limit) options.
>>
>> Everything withi
and check for IFLA_GRE_FLOWINFO attribute presense.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 16 +---
ip/link_ip6tnl.c | 16 +---
2 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
unnel mode to be
inline with ip6tnl.
See individual patch description message for details.
This is v2. Fixed proto value for ipip tunnel mode:
"proto ipip" vs "proto ip4ip4" previously.
v4
rebased to current upstream
v1..v3
no changes. initially started with v3 instead of v1
Than
Use %u format specifier to print it in link_gre6.c and
make code more readable.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 11 ---
ip/link_ip6tnl.c | 12 ++--
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/ip/link_
v4
rebased to current upstream
v1..v3
no changes. initially started with v3 instead of v1
Thanks,
Serhii
Serhey Popovych (7):
ip6/tunnel: Fix tclass output
ip6tnl/tunnel: Do not print obscure flowinfo
ip6/tunnel: Unify tclass printing
ip6/tunnel: Unify flowlabel printing
ip6/tunnel
and check for IFLA_GRE_FLOWINFO attribute presense.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 16 +---
ip/link_ip6tnl.c | 16 +---
2 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
It is implementation internal and main purpose
of printing it seems debugging.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index 8e84ed0..e084975
s: 1facc1c61c07 ("ip: link_ip6tnl.c: add json output support")
Fixes: 2e706e12d9b0 ("Merge branch 'master' into net-next")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c |2 +-
ip/link_ip6tnl.c |2 +-
2 files changed, 2 insertions(+), 2
Use %u format specifier to print it in link_gre6.c and
make code more readable.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 11 ---
ip/link_ip6tnl.c | 12 ++--
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/ip/link_
attribute
is given and IP6_TNL_F_USE_ORIG_FLOWLABEL isn't set.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 15 ---
ip/link_ip6tnl.c | 14 --
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_
To follow ip6tnl output print flowlabel after tclass
in link_gre6.c.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre6.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/ip/link_gre6.c b/ip/link_gre6.c
index 8
To follow gre6 output print hoplimit before encapsulation
limit in link_ip6tnl.c.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_ip6tnl.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c
index 3
Serhey Popovych wrote:
> In this series I present following improvements and fixes:
>
> 1) Add missing open_json_context() to link_iptnl.c
> for "encap" options.
>
> 2) Get rid of code duplication when parsing tunnel mode
> parameters in l
of fputs() and fprintf() to
print encapsulation for !is_json_context().
Print "unknown" parameter for "encap" type in PRINT_FP
context using "%s " format specifier and benefit from
complite time string merge.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.
We return constant string from tnl_strproto(), no need
to copy it to temporary buffer and then return such
buffer as const: return constant string instead.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/tunnel.c | 25 +++--
1 file changed, 7 inse
Serhey Popovych wrote:
> We return constant string from tnl_strproto(), no need
> to copy it to temporary buffer and then return such
> buffer as const: return constant string instead.
>
> Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
This change should be igno
We need NEXT_ARG() to get *argv pointing to "alias"
parameter value. Overwise we get and check "alias"
string length.
Fixes: f88becf35e08 ("iplink: Process "alias" parameter correctly")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
print_0xhex()
and print_string() instead of fprintf() to output values.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/iplink_geneve.c | 23 ---
ip/iplink_vxlan.c | 19 ---
ip/link_gre.c | 23 ---
ip/link_i
"uint" to reflect true nature of the ttl.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/ip6tunnel.c|5 -
ip/iplink_geneve.c| 13 +++--
ip/iplink_vxlan.c | 15 +++
ip/iproute_lwtunnel.c |4 ++--
ip/ip
-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre.c|5 ++---
ip/link_gre6.c |9 -
ip/link_ip6tnl.c | 18 --
ip/link_iptnl.c | 22 ++
ip/link_vti.c|6 ++
ip/link_vti6.c |5 ++---
6 files changed, 28 inse
path because in most cases cache populated.
2) It always return name in the form "if%d", even if
entry is not in cache and ioctl() fails. This drops
"link_index" from JSON output.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
bridge/fdb.c
One is missing in JSON output because fprintf()
is used instead of print_uint().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre.c |3 ++-
ip/link_gre6.c |4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ip/link_gre.c b/ip/link_gre.c
"
in the series: it is related to tunneling code too.
Thanks,
Serhii
Serhey Popovych (9):
iplink: Use ll_index_to_name() instead of if_indextoname()
ip/tunnel: Correct and unify ttl/hoplimit printing
ip/tunnel: Simplify and unify tos printing
ip/tunnel: Use print_0xhex() instead of pri
as in rest
of tunnel support code (64 bytes) and check return from
inet_ntop().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_vti.c | 22 ++
ip/link_vti6.c | 14 ++
2 files changed, 24 insertions(+), 12 deletions(-)
diff --gi
with other tunneling code.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_vti6.c | 32 ++--
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/ip/link_vti6.c b/ip/link_vti6.c
index 6b61e3d..2a86d59 100644
--- a/ip/link_vti6.c
+++
Now we have additional information about address
class from get_addr() we can use it in place of
inet_get_addr().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/iplink_geneve.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
diff --gi
Now we have additional information about address
class from get_addr() we can use it in place of
inet_get_addr().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/iplink_vxlan.c | 72 +++--
1 file changed, 26 insertions(
lue -1.
Reduce intendation by one level and get rid of goto/label
to make code more readable.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
lib/utils.c | 64 +--
1 file changed, 32 insertions(+), 32 deletions(-)
diff --gi
in ip/tunnel code (there will be additional
series based on this one).
Also fix get_addr_1() and get_prefix() to make
sure it always provide correct ->family and
->bitlen.
As always comments, suggestions and criticism
are welcome.
Thanks,
Serhii
Serhey Popovych (6):
utils: Always specify
one explicitly given
as @family: use af_byte_len() to correctly set address length.
Still assume AF_INET when @family is AF_UNSPEC.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
lib/utils.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/utils.c b
Both geneve and vxlan modules are converted to
use get_addr() we can replace inet_get_addr()
in less problematic places and finally get
rid of inet_get_addr().
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
include/utils.h |1 -
ip/iproute_lwtunnel.c |5 +++
or unspecified inet
bool is_addrtype_inet_not_multi(inet_prefix *addr)
true if @addr is not multicast inet address
false if @addr is not inet or multicast inet
Last two are useful for case when we need inet address
that is not unspecified or multicast.
Signed-off-by: Serhey Popovych
Handle "inherit" case properly for gre6 and ip6tnl.
Use get_u8() in gre to parse ttl/hoplimit.
Be consistent about "hlim" alias to ttl/hoplimit
support.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_gre.c| 10 +++---
ip/link_gre6.c
()
will attempt to get index from common name in form "if%d"
that may be returned from ll_index_to_name().
This makes output from ip(8) coherent with it's input.
Note that most of the code already switched from plain
if_nametoindex() to ll_name_to_index() to cached variant.
Signed-off-
8) output and input parameter acceptance
coherent.
See individual patch description message for details.
Thanks,
Serhii
Serhey Popovych (4):
tunnel: Add space between encap-dport and encap-sport in non-JSON
output
iptnl/ip6tnl: Unify ttl/hoplimit parsing routines
vti/vti6: Minor imp
local/remote attributes
from the ikey/okey in vti6 to match vti module.
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/link_vti.c |2 +-
ip/link_vti6.c |6 --
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ip/link_vti.c b/ip/link_vti.c
Fixes: bad76e6b1f44 ("ip/tunnel: Abstract tunnel encapsulation options
printing")
Fixes: e2d4588331fc ("ip: link_gre.c: add json output support")
Signed-off-by: Serhey Popovych <serhe.popov...@gmail.com>
---
ip/tunnel.c |4 ++--
1 file changed, 2 insertions(+),
in editor to 72 max.
v2
Introduce and use inet_addr_match_rta() as suggested by David Ahern.
Check for result from get_prefix() in places where
inet_addr_match_rta() being used.
Thanks,
Serhii
Serhey Popovych (8):
utils: Introduce get_addr_rta() and inet_addr_match_rta()
ipaddress: Use
successfully if
no attribute is given (@rta is NULL), reference address
family is AF_UNSPEC or it's length isn't given; fails if
get_attr_rta() can't get attribute or it's family does
not match reference; calls inet_addr_match() to get final
verdict.
Signed-off-by: Serhey Popovych <serhe.po
1 - 100 of 378 matches
Mail list logo