diff options
Diffstat (limited to 'net/rose/rose_link.c')
-rw-r--r-- | net/rose/rose_link.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c index bd86a63960ce..a750a28e0221 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
18 | #include <linux/net.h> | 18 | #include <linux/net.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/ax25.h> | 20 | #include <net/ax25.h> |
20 | #include <linux/inet.h> | 21 | #include <linux/inet.h> |
21 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
@@ -101,13 +102,17 @@ static void rose_t0timer_expiry(unsigned long param) | |||
101 | static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) | 102 | static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) |
102 | { | 103 | { |
103 | ax25_address *rose_call; | 104 | ax25_address *rose_call; |
105 | ax25_cb *ax25s; | ||
104 | 106 | ||
105 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) | 107 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) |
106 | rose_call = (ax25_address *)neigh->dev->dev_addr; | 108 | rose_call = (ax25_address *)neigh->dev->dev_addr; |
107 | else | 109 | else |
108 | rose_call = &rose_callsign; | 110 | rose_call = &rose_callsign; |
109 | 111 | ||
112 | ax25s = neigh->ax25; | ||
110 | neigh->ax25 = ax25_send_frame(skb, 260, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); | 113 | neigh->ax25 = ax25_send_frame(skb, 260, rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); |
114 | if (ax25s) | ||
115 | ax25_cb_put(ax25s); | ||
111 | 116 | ||
112 | return (neigh->ax25 != NULL); | 117 | return (neigh->ax25 != NULL); |
113 | } | 118 | } |
@@ -120,13 +125,17 @@ static int rose_send_frame(struct sk_buff *skb, struct rose_neigh *neigh) | |||
120 | static int rose_link_up(struct rose_neigh *neigh) | 125 | static int rose_link_up(struct rose_neigh *neigh) |
121 | { | 126 | { |
122 | ax25_address *rose_call; | 127 | ax25_address *rose_call; |
128 | ax25_cb *ax25s; | ||
123 | 129 | ||
124 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) | 130 | if (ax25cmp(&rose_callsign, &null_ax25_address) == 0) |
125 | rose_call = (ax25_address *)neigh->dev->dev_addr; | 131 | rose_call = (ax25_address *)neigh->dev->dev_addr; |
126 | else | 132 | else |
127 | rose_call = &rose_callsign; | 133 | rose_call = &rose_callsign; |
128 | 134 | ||
135 | ax25s = neigh->ax25; | ||
129 | neigh->ax25 = ax25_find_cb(rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); | 136 | neigh->ax25 = ax25_find_cb(rose_call, &neigh->callsign, neigh->digipeat, neigh->dev); |
137 | if (ax25s) | ||
138 | ax25_cb_put(ax25s); | ||
130 | 139 | ||
131 | return (neigh->ax25 != NULL); | 140 | return (neigh->ax25 != NULL); |
132 | } | 141 | } |