iproute2 issue with adding rules.
Subsystems (2)
On older releases, you can do this with iproute:
# ip ru add from 9.9.9.2/32 table 226 pref 400 #
But, in latest git, it returns an error:
# ip ru add from 9.9.9.2/32 table 226 pref 400 Error: an inet prefix is expected rather than "9.9.9.2/32".
Is that on purpose?
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 10 lines · Ben Greear
On older releases, you can do this with iproute:
# ip ru add from 9.9.9.2/32 table 226 pref 400 #But, in latest git, it returns an error:
# ip ru add from 9.9.9.2/32 table 226 pref 400 Error: an inet prefix is expected rather than "9.9.9.2/32".Is that on purpose?
I was thinking maybe this was a library issue, since I compiled on one machine and ran the 'ip' exe on another. So, I tried compiling on the test system.
But, iproute will not compile, apparently because it finds the /usr/include/linux header files before whatever is packaged with iproute:
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -c -o ipaddress.o ipaddress.cipaddress.c: In function ‘print_linkinfo’:
ipaddress.c:334: error: ‘IFLA_VFINFO’ undeclared (first use in this function) ipaddress.c:334: error: (Each undeclared identifier is reported only once ipaddress.c:334: error: for each function it appears in.) make[1]: *** [ipaddress.o] Error 1
make[1]: Leaving directory `/root/git/iproute2/ip'
make: *** [all] Error 2
I tried moving /usr/include/linux out of the way, but then it blows up even worse (can't find errno.h, etc)
Are we supposed to be able to compile iproute2 on a system with moderately outdated kernel headers?
If not, why bother with the iproute/include/linux directory at all?
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 30 lines · On Mon, 17 May 2010 13:13:06 -0700 Ben Greear <[email protected]> wrote:
Quoted 10 lines · Ben Greear
On older releases, you can do this with iproute:
# ip ru add from 9.9.9.2/32 table 226 pref 400 #But, in latest git, it returns an error:
# ip ru add from 9.9.9.2/32 table 226 pref 400 Error: an inet prefix is expected rather than "9.9.9.2/32".Is that on purpose?
I was thinking maybe this was a library issue, since I compiled on one machine and ran the 'ip' exe on another. So, I tried compiling on the test system.
But, iproute will not compile, apparently because it finds the
/usr/include/linuxheader files before whatever is packaged with iproute:gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib/\" -c -o ipaddress.o
ipaddress.cipaddress.c: In function ‘print_linkinfo’:
ipaddress.c:334: error: ‘IFLA_VFINFO’ undeclared (first use in this function) ipaddress.c:334: error: (Each undeclared identifier is reported only once ipaddress.c:334: error: for each function it appears in.) make[1]: *** [ipaddress.o] Error 1
make[1]: Leaving directory `/root/git/iproute2/ip'
make: *** [all] Error 2
Quoted 7 lines
I tried moving
/usr/include/linuxout of the way, but then it blows up even worse (can't finderrno.h, etc)Are we supposed to be able to compile iproute2 on a system with moderately outdated kernel headers?
If not, why bother with the iproute/include/linux directory at all?
The issue is the last minute VF changes in 2.6.34 are not supported in iproute util yet. Please wait until it is fixed.
Quoted 10 lines · Ben Greear
Quoted 9 lines · Ben Greear
On older releases, you can do this with iproute:
# ip ru add from 9.9.9.2/32 table 226 pref 400 #But, in latest git, it returns an error:
# ip ru add from 9.9.9.2/32 table 226 pref 400 Error: an inet prefix is expected rather than "9.9.9.2/32".
Quoted 5 lines
Quoted 1 line
Is that on purpose?
I was thinking maybe this was a library issue, since I compiled on one machine and ran the 'ip' exe on another. So, I tried compiling on the test system.
I'm not thinking too well today, but this patch fixes the compile. No idea if it's actually correct code.
Still can't add the rule like I was trying...but at least it's probably not an issue with libraries:
[root@ct503-10G-09 iproute2]# git diff
ip/ipaddress.c +3 -3
@@ -331,13 +331,13 @@ int print_linkinfo(const struct sockaddr_nl *who, ); } } -if (do_link && tb[IFLA_VFINFO ] && tb[IFLA_NUM_VF ]) { +if (do_link && tb[IFLA_VFINFO_LIST ] && tb[IFLA_NUM_VF ]) {SPRINT_BUF (b1); -struct rtattr *rta = tb[IFLA_VFINFO ]; +struct rtattr *rta = tb[IFLA_VFINFO_LIST ];struct ifla_vf_info *ivi;int i;for (i =0 ; i < *(int *)RTA_DATA (tb[IFLA_NUM_VF ]); i++) { -if (rta->rta_type !=IFLA_VFINFO ) { +if (rta->rta_type !=IFLA_VFINFO_LIST ) {fprintf (stderr,"BUG: rta type is %d\n" , rta->rta_type);break ; }
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 11 lines · * Ben Greear ([email protected]) wrote:
Quoted 10 lines · Ben Greear
Quoted 9 lines · Ben Greear
On older releases, you can do this with iproute:
# ip ru add from 9.9.9.2/32 table 226 pref 400 #But, in latest git, it returns an error:
# ip ru add from 9.9.9.2/32 table 226 pref 400 Error: an inet prefix is expected rather than "9.9.9.2/32".
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Is that on purpose?
I was thinking maybe this was a library issue, since I compiled on one machine and ran the 'ip' exe on another. So, I tried compiling on the test system.
I'm not thinking too well today, but this patch fixes the compile. No idea if it's actually correct code.
Needs more changes than that patch.
thanks,
-chris
Quoted 14 lines · Chris Wright
Quoted 13 lines · * Ben Greear ([email protected]) wrote:
Quoted 12 lines · Ben Greear
Quoted 10 lines · Ben Greear
On older releases, you can do this with iproute:
# ip ru add from 9.9.9.2/32 table 226 pref 400 #But, in latest git, it returns an error:
# ip ru add from 9.9.9.2/32 table 226 pref 400 Error: an inet prefix is expected rather than "9.9.9.2/32".Is that on purpose?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I was thinking maybe this was a library issue, since I compiled on one machine and ran the 'ip' exe on another. So, I tried compiling on the test system.
I'm not thinking too well today, but this patch fixes the compile. No idea if it's actually correct code.
Needs more changes than that patch.
Ok, I'll try going back a few commits to find something that compiles w/out my hacks.
Also, the rule addition does work..make install put ip in a different place than it's installed in fedora, so I wasn't actually running the latest code when I first tried to add the rule.
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
Quoted 24 lines · On Mon, 17 May 2010 13:34:29 -0700 Ben Greear <[email protected]> wrote:
Quoted 14 lines · Chris Wright
Quoted 13 lines · * Ben Greear ([email protected]) wrote:
Quoted 12 lines · Ben Greear
Quoted 10 lines · Ben Greear
On older releases, you can do this with iproute:
# ip ru add from 9.9.9.2/32 table 226 pref 400 #But, in latest git, it returns an error:
# ip ru add from 9.9.9.2/32 table 226 pref 400 Error: an inet prefix is expected rather than "9.9.9.2/32".Is that on purpose?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I was thinking maybe this was a library issue, since I compiled on one machine and ran the 'ip' exe on another. So, I tried compiling on the test system.
I'm not thinking too well today, but this patch fixes the compile. No idea if it's actually correct code.
Needs more changes than that patch.
Quoted 7 lines
Ok, I'll try going back a few commits to find something that compiles w/out my hacks.
Also, the rule addition does work..make install put ip in a different place than it's installed in fedora, so I wasn't actually running the latest code when I first tried to add the rule.
Distributions never seem to agree where it should be: /sbin or /usr/sbin or even /bin