iproute2/ip
Jiri Benc df217d5d5c ip link gre: create interfaces in external mode correctly
For GRE interfaces in 'external' mode, the kernel ignores all manual
settings like remote IP address or TTL. However, for some of those
attributes, kernel checks their value and does not allow them to be zero
(even though they're ignored later).

Currently, 'ip link' always includes all attributes in the netlink message.
This leads to problem with creating interfaces in 'external' mode. For
example, this command does not work:

ip link add gre1 type gretap external

and needs a bogus remote IP address to be specified, as the kernel enforces
remote IP address to be either not present, or not null.

Ignore the parameters that do not make sense in 'external' mode.
Unfortunately, we cannot error out, as there may be existing deployments
that workarounded the bug by specifying bogus values.

Fixes: 926b39e1fe ("gre: add support for collect metadata flag")
Signed-off-by: Jiri Benc <jbenc@redhat.com>
2016-05-06 11:49:08 -07:00
..
.gitignore Another .gitignore file. 2006-08-08 12:11:23 -07:00
Makefile lwtunnel: Add encapsulation support to ip route 2015-10-16 16:13:22 -07:00
ifcfg Remove trailing whitespace 2006-12-05 10:10:22 -08:00
ip.c ip: align help text with manpage 2016-03-02 11:23:51 -08:00
ip6tunnel.c utils: make rt_addr_n2a() non-reentrant by default 2016-03-27 10:37:34 -07:00
ip_common.h vxlan: add support to set flow label 2016-03-27 10:58:48 -07:00
ipaddress.c ip: whitespace cleanup 2016-04-11 22:13:55 +00:00
ipaddrlabel.c lib/utils: introduce format_host_rta() 2016-03-27 10:37:35 -07:00
ipfou.c ip: remove extra newlines at end-of-file 2015-10-23 15:41:58 -07:00
ipl2tp.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_bond.c lib/utils: introduce rt_addr_n2a_rta() 2016-03-27 10:37:35 -07:00
iplink_bond_slave.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_bridge.c iplink: bridge: remove unnecessary returns 2016-02-21 12:00:47 -08:00
iplink_bridge_slave.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_can.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_geneve.c geneve: add support to set flow label 2016-03-27 10:58:48 -07:00
iplink_hsr.c ip link: Shortify printing the usage of link type 2014-10-09 08:29:47 -07:00
iplink_ipoib.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_ipvlan.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_macvlan.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_vlan.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_vrf.c ip: code cleanup 2016-03-21 11:52:19 -07:00
iplink_vxlan.c vxlan: add support to set flow label 2016-03-27 10:58:48 -07:00
ipmaddr.c make format_host non-reentrant by default 2016-03-27 10:37:34 -07:00
ipmonitor.c ip: code cleanup 2016-03-21 11:52:19 -07:00
ipmroute.c lib/utils: introduce rt_addr_n2a_rta() 2016-03-27 10:37:35 -07:00
ipneigh.c ip: neigh: Fix leftover attributes message during flush 2016-04-19 07:52:33 -07:00
ipnetconf.c netconf: add support for ignore route attribute 2016-03-21 12:16:25 -07:00
ipnetns.c include: add linked list implementation from kernel 2016-03-27 10:56:11 -07:00
ipntable.c ip: code cleanup 2016-03-21 11:52:19 -07:00
ipprefix.c lib/utils: introduce rt_addr_n2a_rta() 2016-03-27 10:37:35 -07:00
iproute.c lib/utils: introduce rt_addr_n2a_rta() 2016-03-27 10:37:35 -07:00
iproute_lwtunnel.c lib/utils: introduce rt_addr_n2a_rta() 2016-03-27 10:37:35 -07:00
iproute_lwtunnel.h lwtunnel: Add encapsulation support to ip route 2015-10-16 16:13:22 -07:00
iprule.c lib/utils: introduce rt_addr_n2a_rta() 2016-03-27 10:37:35 -07:00
iptoken.c lib/utils: introduce format_host_rta() 2016-03-27 10:37:35 -07:00
iptunnel.c utils: make rt_addr_n2a() non-reentrant by default 2016-03-27 10:37:34 -07:00
iptuntap.c ip: code cleanup 2016-03-21 11:52:19 -07:00
ipxfrm.c utils: make rt_addr_n2a() non-reentrant by default 2016-03-27 10:37:34 -07:00
link_gre.c ip link gre: create interfaces in external mode correctly 2016-05-06 11:49:08 -07:00
link_gre6.c make format_host non-reentrant by default 2016-03-27 10:37:34 -07:00
link_ip6tnl.c lib/utils: introduce rt_addr_n2a_rta() 2016-03-27 10:37:35 -07:00
link_iptnl.c make format_host non-reentrant by default 2016-03-27 10:37:34 -07:00
link_veth.c ip: code cleanup 2016-03-21 11:52:19 -07:00
link_vti.c make format_host non-reentrant by default 2016-03-27 10:37:34 -07:00
link_vti6.c make format_host non-reentrant by default 2016-03-27 10:37:34 -07:00
routef ip/routef lifesaver 2007-07-10 18:29:20 -07:00
routel (Logical change 1.3) 2004-04-15 20:56:59 +00:00
rtm_map.c ip, realms: also allow to pass in raw realms value 2015-10-22 23:40:51 -07:00
rtmon.c ip: code cleanup 2016-03-21 11:52:19 -07:00
rtpr (Logical change 1.3) 2004-04-15 20:56:59 +00:00
static-syms.c Fix build when shared libraries are disabled 2013-03-13 08:29:59 -07:00
tcp_metrics.c make format_host non-reentrant by default 2016-03-27 10:37:34 -07:00
tunnel.c ip: code cleanup 2016-03-21 11:52:19 -07:00
tunnel.h ip{,6}tunnel: have a shared stats parser/printer 2015-12-18 11:46:21 -08:00
xfrm.h Fix FSF address in file headers 2013-12-06 15:05:07 -08:00
xfrm_monitor.c utils: make rt_addr_n2a() non-reentrant by default 2016-03-27 10:37:34 -07:00
xfrm_policy.c ip: code cleanup 2016-03-21 11:52:19 -07:00
xfrm_state.c ip: code cleanup 2016-03-21 11:52:19 -07:00