fib_rules.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) fib_rules.c (3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * IPv4 Forwarding Information Base: policy rules.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 123 unchanged lines hidden (view full) ---

132 FRA_GENERIC_POLICY,
133 [FRA_FLOW] = { .type = NLA_U32 },
134};
135
136static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
137 struct nlmsghdr *nlh, struct fib_rule_hdr *frh,
138 struct nlattr **tb)
139{
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * IPv4 Forwarding Information Base: policy rules.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 123 unchanged lines hidden (view full) ---

132 FRA_GENERIC_POLICY,
133 [FRA_FLOW] = { .type = NLA_U32 },
134};
135
136static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
137 struct nlmsghdr *nlh, struct fib_rule_hdr *frh,
138 struct nlattr **tb)
139{
140 struct net *net = skb->sk->sk_net;
140 struct net *net = sock_net(skb->sk);
141 int err = -EINVAL;
142 struct fib4_rule *rule4 = (struct fib4_rule *) rule;
143
144 if (frh->tos & ~IPTOS_TOS_MASK)
145 goto errout;
146
147 if (rule->table == RT_TABLE_UNSPEC) {
148 if (rule->action == FR_ACT_TO_TBL) {

--- 181 unchanged lines hidden ---
141 int err = -EINVAL;
142 struct fib4_rule *rule4 = (struct fib4_rule *) rule;
143
144 if (frh->tos & ~IPTOS_TOS_MASK)
145 goto errout;
146
147 if (rule->table == RT_TABLE_UNSPEC) {
148 if (rule->action == FR_ACT_TO_TBL) {

--- 181 unchanged lines hidden ---