diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-02 15:42:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-02 15:42:59 -0400 |
commit | f76bd108e5031202bb40849306f98c4afebe4ef6 (patch) | |
tree | 455e14a23642a82513eebd4e4f7d3b76842869cd /net/netrom | |
parent | cd6feeeafddbef6abfe4d90fb26e42fd844d34ed (diff) | |
parent | eced1dfcfcf6b0a35e925d73916a9d8e36ab5457 (diff) |
Merge branch 'perfcounters/urgent' into perfcounters/core
Merge reason: We are going to modify a place modified by
perfcounters/urgent.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/netrom')
-rw-r--r-- | net/netrom/af_netrom.c | 1 | ||||
-rw-r--r-- | net/netrom/nr_route.c | 21 |
2 files changed, 13 insertions, 9 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index ce51ce012cda..ce1a34b99c23 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -847,6 +847,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr, | |||
847 | sax->fsa_ax25.sax25_family = AF_NETROM; | 847 | sax->fsa_ax25.sax25_family = AF_NETROM; |
848 | sax->fsa_ax25.sax25_ndigis = 1; | 848 | sax->fsa_ax25.sax25_ndigis = 1; |
849 | sax->fsa_ax25.sax25_call = nr->user_addr; | 849 | sax->fsa_ax25.sax25_call = nr->user_addr; |
850 | memset(sax->fsa_digipeater, 0, sizeof(sax->fsa_digipeater)); | ||
850 | sax->fsa_digipeater[0] = nr->dest_addr; | 851 | sax->fsa_digipeater[0] = nr->dest_addr; |
851 | *uaddr_len = sizeof(struct full_sockaddr_ax25); | 852 | *uaddr_len = sizeof(struct full_sockaddr_ax25); |
852 | } else { | 853 | } else { |
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index e943c16552a2..4eb1ac9a7679 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -630,23 +630,23 @@ out: | |||
630 | return dev; | 630 | return dev; |
631 | } | 631 | } |
632 | 632 | ||
633 | static ax25_digi *nr_call_to_digi(int ndigis, ax25_address *digipeaters) | 633 | static ax25_digi *nr_call_to_digi(ax25_digi *digi, int ndigis, |
634 | ax25_address *digipeaters) | ||
634 | { | 635 | { |
635 | static ax25_digi ax25_digi; | ||
636 | int i; | 636 | int i; |
637 | 637 | ||
638 | if (ndigis == 0) | 638 | if (ndigis == 0) |
639 | return NULL; | 639 | return NULL; |
640 | 640 | ||
641 | for (i = 0; i < ndigis; i++) { | 641 | for (i = 0; i < ndigis; i++) { |
642 | ax25_digi.calls[i] = digipeaters[i]; | 642 | digi->calls[i] = digipeaters[i]; |
643 | ax25_digi.repeated[i] = 0; | 643 | digi->repeated[i] = 0; |
644 | } | 644 | } |
645 | 645 | ||
646 | ax25_digi.ndigi = ndigis; | 646 | digi->ndigi = ndigis; |
647 | ax25_digi.lastrepeat = -1; | 647 | digi->lastrepeat = -1; |
648 | 648 | ||
649 | return &ax25_digi; | 649 | return digi; |
650 | } | 650 | } |
651 | 651 | ||
652 | /* | 652 | /* |
@@ -656,6 +656,7 @@ int nr_rt_ioctl(unsigned int cmd, void __user *arg) | |||
656 | { | 656 | { |
657 | struct nr_route_struct nr_route; | 657 | struct nr_route_struct nr_route; |
658 | struct net_device *dev; | 658 | struct net_device *dev; |
659 | ax25_digi digi; | ||
659 | int ret; | 660 | int ret; |
660 | 661 | ||
661 | switch (cmd) { | 662 | switch (cmd) { |
@@ -673,13 +674,15 @@ int nr_rt_ioctl(unsigned int cmd, void __user *arg) | |||
673 | ret = nr_add_node(&nr_route.callsign, | 674 | ret = nr_add_node(&nr_route.callsign, |
674 | nr_route.mnemonic, | 675 | nr_route.mnemonic, |
675 | &nr_route.neighbour, | 676 | &nr_route.neighbour, |
676 | nr_call_to_digi(nr_route.ndigis, nr_route.digipeaters), | 677 | nr_call_to_digi(&digi, nr_route.ndigis, |
678 | nr_route.digipeaters), | ||
677 | dev, nr_route.quality, | 679 | dev, nr_route.quality, |
678 | nr_route.obs_count); | 680 | nr_route.obs_count); |
679 | break; | 681 | break; |
680 | case NETROM_NEIGH: | 682 | case NETROM_NEIGH: |
681 | ret = nr_add_neigh(&nr_route.callsign, | 683 | ret = nr_add_neigh(&nr_route.callsign, |
682 | nr_call_to_digi(nr_route.ndigis, nr_route.digipeaters), | 684 | nr_call_to_digi(&digi, nr_route.ndigis, |
685 | nr_route.digipeaters), | ||
683 | dev, nr_route.quality); | 686 | dev, nr_route.quality); |
684 | break; | 687 | break; |
685 | default: | 688 | default: |