summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2005-05-03 14:29:00 -0700
committerDavid S. Miller <davem@davemloft.net>2005-05-03 14:29:00 -0700
commitf90a0a74b864fdc46737614f03b8868f4f31e3bf (patch)
tree6da3a1159fb7038511974c540d1bbf89a24c5eb3 /include/linux
parentd775fc09f16f4b88cd0373006b112c4772589778 (diff)
downloadblackbird-op-linux-f90a0a74b864fdc46737614f03b8868f4f31e3bf.tar.gz
blackbird-op-linux-f90a0a74b864fdc46737614f03b8868f4f31e3bf.zip
[RTNETLINK] Fix & cleanup rtm_min/rtm_max
Converts rtm_min and rtm_max arrays to use c99 designated initializers for easier insertion of new message families. RTM_GETMULTICAST and RTM_GETANYCAST did not have the minimal message size specified which means that the netlink message was parsed for routing attributes starting from the header. Adds the proper minimal message sizes for these messages (netlink header + common rtnetlink header) to fix this issue. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rtnetlink.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index d607219af6ac..1ecaea74d55a 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -93,6 +93,8 @@ enum {
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
};
+#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
+
/*
Generic structure for encapsulation of optional route information.
It is reminiscent of sockaddr, but with sa_family replaced
OpenPOWER on IntegriCloud