diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/rtnetlink.h | 8 | ||||
| -rw-r--r-- | include/linux/xfrm.h | 5 | ||||
| -rw-r--r-- | include/net/addrconf.h | 1 | ||||
| -rw-r--r-- | include/net/pkt_sched.h | 3 | ||||
| -rw-r--r-- | include/net/xfrm.h | 10 |
5 files changed, 23 insertions, 4 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 32e52769a00b..91ac97c20777 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -89,10 +89,14 @@ enum { | |||
| 89 | RTM_GETANYCAST = 62, | 89 | RTM_GETANYCAST = 62, |
| 90 | #define RTM_GETANYCAST RTM_GETANYCAST | 90 | #define RTM_GETANYCAST RTM_GETANYCAST |
| 91 | 91 | ||
| 92 | RTM_MAX, | 92 | __RTM_MAX, |
| 93 | #define RTM_MAX RTM_MAX | 93 | #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) |
| 94 | }; | 94 | }; |
| 95 | 95 | ||
| 96 | #define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE) | ||
| 97 | #define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2) | ||
| 98 | #define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2) | ||
| 99 | |||
| 96 | /* | 100 | /* |
| 97 | Generic structure for encapsulation of optional route information. | 101 | Generic structure for encapsulation of optional route information. |
| 98 | It is reminiscent of sockaddr, but with sa_family replaced | 102 | It is reminiscent of sockaddr, but with sa_family replaced |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index f0df02ae68a4..fd2ef742a9fd 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
| @@ -140,8 +140,11 @@ enum { | |||
| 140 | XFRM_MSG_FLUSHPOLICY, | 140 | XFRM_MSG_FLUSHPOLICY, |
| 141 | #define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY | 141 | #define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY |
| 142 | 142 | ||
| 143 | XFRM_MSG_MAX | 143 | __XFRM_MSG_MAX |
| 144 | }; | 144 | }; |
| 145 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) | ||
| 146 | |||
| 147 | #define XFRM_NR_MSGTYPES (XFRM_MSG_MAX + 1 - XFRM_MSG_BASE) | ||
| 145 | 148 | ||
| 146 | struct xfrm_user_tmpl { | 149 | struct xfrm_user_tmpl { |
| 147 | struct xfrm_id id; | 150 | struct xfrm_id id; |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 7af9a13cb9be..f1e5af4be98e 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
| @@ -46,6 +46,7 @@ struct prefix_info { | |||
| 46 | #include <linux/in6.h> | 46 | #include <linux/in6.h> |
| 47 | #include <linux/netdevice.h> | 47 | #include <linux/netdevice.h> |
| 48 | #include <net/if_inet6.h> | 48 | #include <net/if_inet6.h> |
| 49 | #include <net/ipv6.h> | ||
| 49 | 50 | ||
| 50 | #define IN6_ADDR_HSIZE 16 | 51 | #define IN6_ADDR_HSIZE 16 |
| 51 | 52 | ||
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 7352e455053c..fcb05a387dbe 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
| @@ -157,7 +157,8 @@ psched_tod_diff(int delta_sec, int bound) | |||
| 157 | case 1: \ | 157 | case 1: \ |
| 158 | __delta += 1000000; \ | 158 | __delta += 1000000; \ |
| 159 | case 0: \ | 159 | case 0: \ |
| 160 | __delta = abs(__delta); \ | 160 | if (__delta > bound || __delta < 0) \ |
| 161 | __delta = bound; \ | ||
| 161 | } \ | 162 | } \ |
| 162 | __delta; \ | 163 | __delta; \ |
| 163 | }) | 164 | }) |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 73e9a8ca3d3b..e142a256d5dc 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _NET_XFRM_H | 1 | #ifndef _NET_XFRM_H |
| 2 | #define _NET_XFRM_H | 2 | #define _NET_XFRM_H |
| 3 | 3 | ||
| 4 | #include <linux/compiler.h> | ||
| 4 | #include <linux/xfrm.h> | 5 | #include <linux/xfrm.h> |
| 5 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
| 6 | #include <linux/list.h> | 7 | #include <linux/list.h> |
| @@ -516,6 +517,15 @@ struct xfrm_dst | |||
| 516 | u32 child_mtu_cached; | 517 | u32 child_mtu_cached; |
| 517 | }; | 518 | }; |
| 518 | 519 | ||
| 520 | static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) | ||
| 521 | { | ||
| 522 | dst_release(xdst->route); | ||
| 523 | if (likely(xdst->u.dst.xfrm)) | ||
| 524 | xfrm_state_put(xdst->u.dst.xfrm); | ||
| 525 | } | ||
| 526 | |||
| 527 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); | ||
| 528 | |||
| 519 | /* Decapsulation state, used by the input to store data during | 529 | /* Decapsulation state, used by the input to store data during |
| 520 | * decapsulation procedure, to be used later (during the policy | 530 | * decapsulation procedure, to be used later (during the policy |
| 521 | * check | 531 | * check |
