Bug 107071

Summary: ip route add with src fails with RTNETLINK answers: Invalid argument
Product: Networking Reporter: vladi
Component: IPV4Assignee: Stephen Hemminger (stephen)
Status: NEW ---    
Severity: normal CC: dsahern, masc, shemming, szg00000
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.3.0 Subsystem:
Regression: No Bisected commit-id:

Description vladi 2015-11-03 04:37:03 UTC
when I try to add sudo ip route add 10.248.5.0/24 dev bond0.250 table vlan_250 src 10.248.5.154

I get RTNETLINK answers: Invalid argument

On latest 4.3 compiled from source on ubuntu 14.04

strace:
https://bpaste.net/show/78afc27a1bb7
Comment 1 Stephen Hemminger 2015-11-03 16:11:49 UTC
It is not ip route but the kernel that is complaining.
The reason it is invalid is most likely that 10.248.5.154 is not an ip address on that interface.
Comment 2 vladi 2015-11-03 20:50:22 UTC
bond0.250 Link encap:Ethernet  HWaddr d2:ad:06:04:ba:c9  
          inet addr:10.248.5.154  Bcast:10.248.5.255  Mask:255.255.255.0
          inet6 addr: fe80::d0ad:6ff:fe04:bac9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54054 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19220 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:223762768 (223.7 MB)  TX bytes:1831232 (1.8 MB)

the command also works fine if i go back to kernel 4.2.1
Comment 3 David Ahern 2015-11-03 23:45:23 UTC
I see what the problem is; will send a patch