diff options
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/af_decnet.c | 32 | ||||
-rw-r--r-- | net/decnet/dn_dev.c | 15 | ||||
-rw-r--r-- | net/decnet/dn_neigh.c | 9 | ||||
-rw-r--r-- | net/decnet/dn_nsp_in.c | 3 | ||||
-rw-r--r-- | net/decnet/dn_route.c | 29 | ||||
-rw-r--r-- | net/decnet/dn_rules.c | 22 |
6 files changed, 52 insertions, 58 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 2b494fac9468..d6b93d19790f 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -446,7 +446,7 @@ static void dn_destruct(struct sock *sk) | |||
446 | skb_queue_purge(&scp->other_xmit_queue); | 446 | skb_queue_purge(&scp->other_xmit_queue); |
447 | skb_queue_purge(&scp->other_receive_queue); | 447 | skb_queue_purge(&scp->other_receive_queue); |
448 | 448 | ||
449 | dst_release(xchg(&sk->sk_dst_cache, NULL)); | 449 | dst_release(rcu_dereference_check(sk->sk_dst_cache, 1)); |
450 | } | 450 | } |
451 | 451 | ||
452 | static int dn_memory_pressure; | 452 | static int dn_memory_pressure; |
@@ -832,7 +832,7 @@ static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation) | |||
832 | scp->segsize_loc = dst_metric(__sk_dst_get(sk), RTAX_ADVMSS); | 832 | scp->segsize_loc = dst_metric(__sk_dst_get(sk), RTAX_ADVMSS); |
833 | dn_send_conn_conf(sk, allocation); | 833 | dn_send_conn_conf(sk, allocation); |
834 | 834 | ||
835 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 835 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
836 | for(;;) { | 836 | for(;;) { |
837 | release_sock(sk); | 837 | release_sock(sk); |
838 | if (scp->state == DN_CC) | 838 | if (scp->state == DN_CC) |
@@ -850,9 +850,9 @@ static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation) | |||
850 | err = -EAGAIN; | 850 | err = -EAGAIN; |
851 | if (!*timeo) | 851 | if (!*timeo) |
852 | break; | 852 | break; |
853 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 853 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
854 | } | 854 | } |
855 | finish_wait(sk->sk_sleep, &wait); | 855 | finish_wait(sk_sleep(sk), &wait); |
856 | if (err == 0) { | 856 | if (err == 0) { |
857 | sk->sk_socket->state = SS_CONNECTED; | 857 | sk->sk_socket->state = SS_CONNECTED; |
858 | } else if (scp->state != DN_CC) { | 858 | } else if (scp->state != DN_CC) { |
@@ -873,7 +873,7 @@ static int dn_wait_run(struct sock *sk, long *timeo) | |||
873 | if (!*timeo) | 873 | if (!*timeo) |
874 | return -EALREADY; | 874 | return -EALREADY; |
875 | 875 | ||
876 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 876 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
877 | for(;;) { | 877 | for(;;) { |
878 | release_sock(sk); | 878 | release_sock(sk); |
879 | if (scp->state == DN_CI || scp->state == DN_CC) | 879 | if (scp->state == DN_CI || scp->state == DN_CC) |
@@ -891,9 +891,9 @@ static int dn_wait_run(struct sock *sk, long *timeo) | |||
891 | err = -ETIMEDOUT; | 891 | err = -ETIMEDOUT; |
892 | if (!*timeo) | 892 | if (!*timeo) |
893 | break; | 893 | break; |
894 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 894 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
895 | } | 895 | } |
896 | finish_wait(sk->sk_sleep, &wait); | 896 | finish_wait(sk_sleep(sk), &wait); |
897 | out: | 897 | out: |
898 | if (err == 0) { | 898 | if (err == 0) { |
899 | sk->sk_socket->state = SS_CONNECTED; | 899 | sk->sk_socket->state = SS_CONNECTED; |
@@ -1040,7 +1040,7 @@ static struct sk_buff *dn_wait_for_connect(struct sock *sk, long *timeo) | |||
1040 | struct sk_buff *skb = NULL; | 1040 | struct sk_buff *skb = NULL; |
1041 | int err = 0; | 1041 | int err = 0; |
1042 | 1042 | ||
1043 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 1043 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
1044 | for(;;) { | 1044 | for(;;) { |
1045 | release_sock(sk); | 1045 | release_sock(sk); |
1046 | skb = skb_dequeue(&sk->sk_receive_queue); | 1046 | skb = skb_dequeue(&sk->sk_receive_queue); |
@@ -1060,9 +1060,9 @@ static struct sk_buff *dn_wait_for_connect(struct sock *sk, long *timeo) | |||
1060 | err = -EAGAIN; | 1060 | err = -EAGAIN; |
1061 | if (!*timeo) | 1061 | if (!*timeo) |
1062 | break; | 1062 | break; |
1063 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 1063 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
1064 | } | 1064 | } |
1065 | finish_wait(sk->sk_sleep, &wait); | 1065 | finish_wait(sk_sleep(sk), &wait); |
1066 | 1066 | ||
1067 | return skb == NULL ? ERR_PTR(err) : skb; | 1067 | return skb == NULL ? ERR_PTR(err) : skb; |
1068 | } | 1068 | } |
@@ -1105,7 +1105,7 @@ static int dn_accept(struct socket *sock, struct socket *newsock, int flags) | |||
1105 | release_sock(sk); | 1105 | release_sock(sk); |
1106 | 1106 | ||
1107 | dst = skb_dst(skb); | 1107 | dst = skb_dst(skb); |
1108 | dst_release(xchg(&newsk->sk_dst_cache, dst)); | 1108 | sk_dst_set(newsk, dst); |
1109 | skb_dst_set(skb, NULL); | 1109 | skb_dst_set(skb, NULL); |
1110 | 1110 | ||
1111 | DN_SK(newsk)->state = DN_CR; | 1111 | DN_SK(newsk)->state = DN_CR; |
@@ -1746,11 +1746,11 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1746 | goto out; | 1746 | goto out; |
1747 | } | 1747 | } |
1748 | 1748 | ||
1749 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 1749 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
1750 | set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); | 1750 | set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); |
1751 | sk_wait_event(sk, &timeo, dn_data_ready(sk, queue, flags, target)); | 1751 | sk_wait_event(sk, &timeo, dn_data_ready(sk, queue, flags, target)); |
1752 | clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); | 1752 | clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); |
1753 | finish_wait(sk->sk_sleep, &wait); | 1753 | finish_wait(sk_sleep(sk), &wait); |
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | skb_queue_walk_safe(queue, skb, n) { | 1756 | skb_queue_walk_safe(queue, skb, n) { |
@@ -1956,7 +1956,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1956 | } | 1956 | } |
1957 | 1957 | ||
1958 | if ((flags & MSG_TRYHARD) && sk->sk_dst_cache) | 1958 | if ((flags & MSG_TRYHARD) && sk->sk_dst_cache) |
1959 | dst_negative_advice(&sk->sk_dst_cache, sk); | 1959 | dst_negative_advice(sk); |
1960 | 1960 | ||
1961 | mss = scp->segsize_rem; | 1961 | mss = scp->segsize_rem; |
1962 | fctype = scp->services_rem & NSP_FC_MASK; | 1962 | fctype = scp->services_rem & NSP_FC_MASK; |
@@ -2003,12 +2003,12 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
2003 | goto out; | 2003 | goto out; |
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); | 2006 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
2007 | set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); | 2007 | set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); |
2008 | sk_wait_event(sk, &timeo, | 2008 | sk_wait_event(sk, &timeo, |
2009 | !dn_queue_too_long(scp, queue, flags)); | 2009 | !dn_queue_too_long(scp, queue, flags)); |
2010 | clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); | 2010 | clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); |
2011 | finish_wait(sk->sk_sleep, &wait); | 2011 | finish_wait(sk_sleep(sk), &wait); |
2012 | continue; | 2012 | continue; |
2013 | } | 2013 | } |
2014 | 2014 | ||
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index cead68eb254c..4c409b46aa35 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -350,7 +350,7 @@ static void dn_dev_del_ifa(struct dn_dev *dn_db, struct dn_ifaddr **ifap, int de | |||
350 | if (dn_db->dev->type == ARPHRD_ETHER) { | 350 | if (dn_db->dev->type == ARPHRD_ETHER) { |
351 | if (ifa1->ifa_local != dn_eth2dn(dev->dev_addr)) { | 351 | if (ifa1->ifa_local != dn_eth2dn(dev->dev_addr)) { |
352 | dn_dn2eth(mac_addr, ifa1->ifa_local); | 352 | dn_dn2eth(mac_addr, ifa1->ifa_local); |
353 | dev_mc_delete(dev, mac_addr, ETH_ALEN, 0); | 353 | dev_mc_del(dev, mac_addr); |
354 | } | 354 | } |
355 | } | 355 | } |
356 | 356 | ||
@@ -381,7 +381,7 @@ static int dn_dev_insert_ifa(struct dn_dev *dn_db, struct dn_ifaddr *ifa) | |||
381 | if (dev->type == ARPHRD_ETHER) { | 381 | if (dev->type == ARPHRD_ETHER) { |
382 | if (ifa->ifa_local != dn_eth2dn(dev->dev_addr)) { | 382 | if (ifa->ifa_local != dn_eth2dn(dev->dev_addr)) { |
383 | dn_dn2eth(mac_addr, ifa->ifa_local); | 383 | dn_dn2eth(mac_addr, ifa->ifa_local); |
384 | dev_mc_add(dev, mac_addr, ETH_ALEN, 0); | 384 | dev_mc_add(dev, mac_addr); |
385 | } | 385 | } |
386 | } | 386 | } |
387 | 387 | ||
@@ -1001,9 +1001,9 @@ static int dn_eth_up(struct net_device *dev) | |||
1001 | struct dn_dev *dn_db = dev->dn_ptr; | 1001 | struct dn_dev *dn_db = dev->dn_ptr; |
1002 | 1002 | ||
1003 | if (dn_db->parms.forwarding == 0) | 1003 | if (dn_db->parms.forwarding == 0) |
1004 | dev_mc_add(dev, dn_rt_all_end_mcast, ETH_ALEN, 0); | 1004 | dev_mc_add(dev, dn_rt_all_end_mcast); |
1005 | else | 1005 | else |
1006 | dev_mc_add(dev, dn_rt_all_rt_mcast, ETH_ALEN, 0); | 1006 | dev_mc_add(dev, dn_rt_all_rt_mcast); |
1007 | 1007 | ||
1008 | dn_db->use_long = 1; | 1008 | dn_db->use_long = 1; |
1009 | 1009 | ||
@@ -1015,9 +1015,9 @@ static void dn_eth_down(struct net_device *dev) | |||
1015 | struct dn_dev *dn_db = dev->dn_ptr; | 1015 | struct dn_dev *dn_db = dev->dn_ptr; |
1016 | 1016 | ||
1017 | if (dn_db->parms.forwarding == 0) | 1017 | if (dn_db->parms.forwarding == 0) |
1018 | dev_mc_delete(dev, dn_rt_all_end_mcast, ETH_ALEN, 0); | 1018 | dev_mc_del(dev, dn_rt_all_end_mcast); |
1019 | else | 1019 | else |
1020 | dev_mc_delete(dev, dn_rt_all_rt_mcast, ETH_ALEN, 0); | 1020 | dev_mc_del(dev, dn_rt_all_rt_mcast); |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | static void dn_dev_set_timer(struct net_device *dev); | 1023 | static void dn_dev_set_timer(struct net_device *dev); |
@@ -1220,17 +1220,14 @@ void dn_dev_down(struct net_device *dev) | |||
1220 | 1220 | ||
1221 | void dn_dev_init_pkt(struct sk_buff *skb) | 1221 | void dn_dev_init_pkt(struct sk_buff *skb) |
1222 | { | 1222 | { |
1223 | return; | ||
1224 | } | 1223 | } |
1225 | 1224 | ||
1226 | void dn_dev_veri_pkt(struct sk_buff *skb) | 1225 | void dn_dev_veri_pkt(struct sk_buff *skb) |
1227 | { | 1226 | { |
1228 | return; | ||
1229 | } | 1227 | } |
1230 | 1228 | ||
1231 | void dn_dev_hello(struct sk_buff *skb) | 1229 | void dn_dev_hello(struct sk_buff *skb) |
1232 | { | 1230 | { |
1233 | return; | ||
1234 | } | 1231 | } |
1235 | 1232 | ||
1236 | void dn_dev_devices_off(void) | 1233 | void dn_dev_devices_off(void) |
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index deb723dba44b..0363bb95cc7d 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -266,7 +266,8 @@ static int dn_long_output(struct sk_buff *skb) | |||
266 | 266 | ||
267 | skb_reset_network_header(skb); | 267 | skb_reset_network_header(skb); |
268 | 268 | ||
269 | return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); | 269 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL, |
270 | neigh->dev, dn_neigh_output_packet); | ||
270 | } | 271 | } |
271 | 272 | ||
272 | static int dn_short_output(struct sk_buff *skb) | 273 | static int dn_short_output(struct sk_buff *skb) |
@@ -305,7 +306,8 @@ static int dn_short_output(struct sk_buff *skb) | |||
305 | 306 | ||
306 | skb_reset_network_header(skb); | 307 | skb_reset_network_header(skb); |
307 | 308 | ||
308 | return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); | 309 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL, |
310 | neigh->dev, dn_neigh_output_packet); | ||
309 | } | 311 | } |
310 | 312 | ||
311 | /* | 313 | /* |
@@ -347,7 +349,8 @@ static int dn_phase3_output(struct sk_buff *skb) | |||
347 | 349 | ||
348 | skb_reset_network_header(skb); | 350 | skb_reset_network_header(skb); |
349 | 351 | ||
350 | return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); | 352 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL, |
353 | neigh->dev, dn_neigh_output_packet); | ||
351 | } | 354 | } |
352 | 355 | ||
353 | /* | 356 | /* |
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c index 25a37299bc65..b430549e2b91 100644 --- a/net/decnet/dn_nsp_in.c +++ b/net/decnet/dn_nsp_in.c | |||
@@ -810,7 +810,8 @@ free_out: | |||
810 | 810 | ||
811 | int dn_nsp_rx(struct sk_buff *skb) | 811 | int dn_nsp_rx(struct sk_buff *skb) |
812 | { | 812 | { |
813 | return NF_HOOK(PF_DECnet, NF_DN_LOCAL_IN, skb, skb->dev, NULL, dn_nsp_rx_packet); | 813 | return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_IN, skb, skb->dev, NULL, |
814 | dn_nsp_rx_packet); | ||
814 | } | 815 | } |
815 | 816 | ||
816 | /* | 817 | /* |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 70ebe74027d5..812e6dff6067 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -264,7 +264,6 @@ static struct dst_entry *dn_dst_negative_advice(struct dst_entry *dst) | |||
264 | 264 | ||
265 | static void dn_dst_link_failure(struct sk_buff *skb) | 265 | static void dn_dst_link_failure(struct sk_buff *skb) |
266 | { | 266 | { |
267 | return; | ||
268 | } | 267 | } |
269 | 268 | ||
270 | static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) | 269 | static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) |
@@ -518,7 +517,8 @@ static int dn_route_rx_long(struct sk_buff *skb) | |||
518 | ptr++; | 517 | ptr++; |
519 | cb->hops = *ptr++; /* Visit Count */ | 518 | cb->hops = *ptr++; /* Visit Count */ |
520 | 519 | ||
521 | return NF_HOOK(PF_DECnet, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, dn_route_rx_packet); | 520 | return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, |
521 | dn_route_rx_packet); | ||
522 | 522 | ||
523 | drop_it: | 523 | drop_it: |
524 | kfree_skb(skb); | 524 | kfree_skb(skb); |
@@ -544,7 +544,8 @@ static int dn_route_rx_short(struct sk_buff *skb) | |||
544 | ptr += 2; | 544 | ptr += 2; |
545 | cb->hops = *ptr & 0x3f; | 545 | cb->hops = *ptr & 0x3f; |
546 | 546 | ||
547 | return NF_HOOK(PF_DECnet, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, dn_route_rx_packet); | 547 | return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, |
548 | dn_route_rx_packet); | ||
548 | 549 | ||
549 | drop_it: | 550 | drop_it: |
550 | kfree_skb(skb); | 551 | kfree_skb(skb); |
@@ -646,16 +647,24 @@ int dn_route_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type | |||
646 | 647 | ||
647 | switch(flags & DN_RT_CNTL_MSK) { | 648 | switch(flags & DN_RT_CNTL_MSK) { |
648 | case DN_RT_PKT_HELO: | 649 | case DN_RT_PKT_HELO: |
649 | return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_route_ptp_hello); | 650 | return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO, |
651 | skb, skb->dev, NULL, | ||
652 | dn_route_ptp_hello); | ||
650 | 653 | ||
651 | case DN_RT_PKT_L1RT: | 654 | case DN_RT_PKT_L1RT: |
652 | case DN_RT_PKT_L2RT: | 655 | case DN_RT_PKT_L2RT: |
653 | return NF_HOOK(PF_DECnet, NF_DN_ROUTE, skb, skb->dev, NULL, dn_route_discard); | 656 | return NF_HOOK(NFPROTO_DECNET, NF_DN_ROUTE, |
657 | skb, skb->dev, NULL, | ||
658 | dn_route_discard); | ||
654 | case DN_RT_PKT_ERTH: | 659 | case DN_RT_PKT_ERTH: |
655 | return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_neigh_router_hello); | 660 | return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO, |
661 | skb, skb->dev, NULL, | ||
662 | dn_neigh_router_hello); | ||
656 | 663 | ||
657 | case DN_RT_PKT_EEDH: | 664 | case DN_RT_PKT_EEDH: |
658 | return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_neigh_endnode_hello); | 665 | return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO, |
666 | skb, skb->dev, NULL, | ||
667 | dn_neigh_endnode_hello); | ||
659 | } | 668 | } |
660 | } else { | 669 | } else { |
661 | if (dn->parms.state != DN_DEV_S_RU) | 670 | if (dn->parms.state != DN_DEV_S_RU) |
@@ -704,7 +713,8 @@ static int dn_output(struct sk_buff *skb) | |||
704 | cb->rt_flags |= DN_RT_F_IE; | 713 | cb->rt_flags |= DN_RT_F_IE; |
705 | cb->hops = 0; | 714 | cb->hops = 0; |
706 | 715 | ||
707 | return NF_HOOK(PF_DECnet, NF_DN_LOCAL_OUT, skb, NULL, dev, neigh->output); | 716 | return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_OUT, skb, NULL, dev, |
717 | neigh->output); | ||
708 | 718 | ||
709 | error: | 719 | error: |
710 | if (net_ratelimit()) | 720 | if (net_ratelimit()) |
@@ -753,7 +763,8 @@ static int dn_forward(struct sk_buff *skb) | |||
753 | if (rt->rt_flags & RTCF_DOREDIRECT) | 763 | if (rt->rt_flags & RTCF_DOREDIRECT) |
754 | cb->rt_flags |= DN_RT_F_IE; | 764 | cb->rt_flags |= DN_RT_F_IE; |
755 | 765 | ||
756 | return NF_HOOK(PF_DECnet, NF_DN_FORWARD, skb, dev, skb->dev, neigh->output); | 766 | return NF_HOOK(NFPROTO_DECNET, NF_DN_FORWARD, skb, dev, skb->dev, |
767 | neigh->output); | ||
757 | 768 | ||
758 | drop: | 769 | drop: |
759 | kfree_skb(skb); | 770 | kfree_skb(skb); |
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 7466c546f286..48fdf10be7a1 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c | |||
@@ -196,7 +196,6 @@ static int dn_fib_rule_fill(struct fib_rule *rule, struct sk_buff *skb, | |||
196 | { | 196 | { |
197 | struct dn_fib_rule *r = (struct dn_fib_rule *)rule; | 197 | struct dn_fib_rule *r = (struct dn_fib_rule *)rule; |
198 | 198 | ||
199 | frh->family = AF_DECnet; | ||
200 | frh->dst_len = r->dst_len; | 199 | frh->dst_len = r->dst_len; |
201 | frh->src_len = r->src_len; | 200 | frh->src_len = r->src_len; |
202 | frh->tos = 0; | 201 | frh->tos = 0; |
@@ -212,29 +211,12 @@ nla_put_failure: | |||
212 | return -ENOBUFS; | 211 | return -ENOBUFS; |
213 | } | 212 | } |
214 | 213 | ||
215 | static u32 dn_fib_rule_default_pref(struct fib_rules_ops *ops) | ||
216 | { | ||
217 | struct list_head *pos; | ||
218 | struct fib_rule *rule; | ||
219 | |||
220 | if (!list_empty(&dn_fib_rules_ops->rules_list)) { | ||
221 | pos = dn_fib_rules_ops->rules_list.next; | ||
222 | if (pos->next != &dn_fib_rules_ops->rules_list) { | ||
223 | rule = list_entry(pos->next, struct fib_rule, list); | ||
224 | if (rule->pref) | ||
225 | return rule->pref - 1; | ||
226 | } | ||
227 | } | ||
228 | |||
229 | return 0; | ||
230 | } | ||
231 | |||
232 | static void dn_fib_rule_flush_cache(struct fib_rules_ops *ops) | 214 | static void dn_fib_rule_flush_cache(struct fib_rules_ops *ops) |
233 | { | 215 | { |
234 | dn_rt_cache_flush(-1); | 216 | dn_rt_cache_flush(-1); |
235 | } | 217 | } |
236 | 218 | ||
237 | static struct fib_rules_ops dn_fib_rules_ops_template = { | 219 | static const struct fib_rules_ops __net_initdata dn_fib_rules_ops_template = { |
238 | .family = AF_DECnet, | 220 | .family = AF_DECnet, |
239 | .rule_size = sizeof(struct dn_fib_rule), | 221 | .rule_size = sizeof(struct dn_fib_rule), |
240 | .addr_size = sizeof(u16), | 222 | .addr_size = sizeof(u16), |
@@ -243,7 +225,7 @@ static struct fib_rules_ops dn_fib_rules_ops_template = { | |||
243 | .configure = dn_fib_rule_configure, | 225 | .configure = dn_fib_rule_configure, |
244 | .compare = dn_fib_rule_compare, | 226 | .compare = dn_fib_rule_compare, |
245 | .fill = dn_fib_rule_fill, | 227 | .fill = dn_fib_rule_fill, |
246 | .default_pref = dn_fib_rule_default_pref, | 228 | .default_pref = fib_default_rule_pref, |
247 | .flush_cache = dn_fib_rule_flush_cache, | 229 | .flush_cache = dn_fib_rule_flush_cache, |
248 | .nlgroup = RTNLGRP_DECnet_RULE, | 230 | .nlgroup = RTNLGRP_DECnet_RULE, |
249 | .policy = dn_fib_rule_policy, | 231 | .policy = dn_fib_rule_policy, |