iproute2/ip
Andy Gay af1b6a41d4 Fix struct alignment with cris architecture
[IPROUTE]: Fix struct alignment with cris architecture

gcc for the cris arch does not pad structures to the next multiple of 4
bytes, as the i386 gcc does.

This causes errors like this when displaying xfrm policies:

# ip x p
!!!Deficit 3, rta_len=300
src 192.168.251.32/29 dst 192.168.251.32/29
        dir in priority 0
!!!Deficit 3, rta_len=180
src 0.0.0.0/0 dst 192.168.251.32/29
        dir in priority 2208
....

Similar errors are seen from ip x s.

This patch fixes the errors when printing. I'm not sure whether we
should worry about other uses of the affected structs, I've not seen any
other bad effects from this though, so hopefully this is enough.

(Thanks to Herbert Xu for pointing out that NLMSG_SPACE is the correct
macro to use here.)

Tested against 2.6.17.6 kernel on i386, and 2.6.16.1 kernel on cris.

Signed-off-by: Andy Gay <andy@andynet.net>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-08-11 09:44:36 -07:00
..
.gitignore Another .gitignore file. 2006-08-08 12:11:23 -07:00
Makefile IP ntable support and header update. 2006-01-10 18:43:32 +00:00
ifcfg if you simply run `ifcfg iface`, you get: 2006-05-09 10:56:53 -07:00
ip.c IP ntable support and header update. 2006-01-10 18:43:32 +00:00
ip_common.h Add support for larger number of routing tables 2006-08-10 16:12:07 -07:00
ipaddress.c Fix leaks and warnings reported by valgrind. 2005-09-21 19:33:17 +00:00
iplink.c The ip(8) command has a bug when dealing with IPoIB link layer 2006-03-21 23:57:50 +00:00
ipmaddr.c Cleanup GCC4 warnings about signedness. 2005-07-05 22:37:15 +00:00
ipmonitor.c Fix ip monitor since it is special and can't reuse 2005-09-07 17:43:00 +00:00
ipmroute.c Reenable 'ip mroute' 2005-10-07 16:41:34 +00:00
ipneigh.c The ip(8) command has a bug when dealing with IPoIB link layer 2006-03-21 23:57:50 +00:00
ipntable.c Add missing files. 2006-01-10 18:50:18 +00:00
ipprefix.c tb buffer initialization is now done in the parser 2005-01-18 22:11:58 +00:00
iproute.c Add support for larger number of routing tables 2006-08-10 16:12:07 -07:00
iprule.c Add support for larger number of routing tables 2006-08-10 16:12:07 -07:00
iptunnel.c Fix build error on Ubuntu (Debian) because of ip.h dependence 2006-08-08 12:16:55 -07:00
ipxfrm.c ndle DCCP in ipxfrm.c to allow using port numbers in the selector. 2006-01-12 18:31:36 +00:00
routef (Logical change 1.3) 2004-04-15 20:56:59 +00:00
routel (Logical change 1.3) 2004-04-15 20:56:59 +00:00
rtm_map.c (Logical change 1.3) 2004-04-15 20:56:59 +00:00
rtmon.c Add ip rule flush capabilty and fix all the prototype changes 2004-12-07 21:48:29 +00:00
rtpr (Logical change 1.3) 2004-04-15 20:56:59 +00:00
xfrm.h ndle DCCP in ipxfrm.c to allow using port numbers in the selector. 2006-01-12 18:31:36 +00:00
xfrm_monitor.c Minor fixes from Masahide for XFRM dynamic keying 2005-11-07 18:39:30 +00:00
xfrm_policy.c Fix struct alignment with cris architecture 2006-08-11 09:44:36 -07:00
xfrm_state.c Fix struct alignment with cris architecture 2006-08-11 09:44:36 -07:00