Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65321
b: refs/heads/master
c: 891e6a9
h: refs/heads/master
i:
  65319: 1e3372a
v: v3
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Oct 8, 2007
1 parent 51a0f1c commit a95e376
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48611c47d09023d9356e78550d1cadb8d61da9c8
refs/heads/master: 891e6a931255238dddd08a7b306871240961a27f
2 changes: 1 addition & 1 deletion trunk/include/net/rose.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ extern void rose_kick(struct sock *);
extern void rose_enquiry_response(struct sock *);

/* rose_route.c */
extern struct rose_neigh rose_loopback_neigh;
extern struct rose_neigh *rose_loopback_neigh;
extern const struct file_operations rose_neigh_fops;
extern const struct file_operations rose_nodes_fops;
extern const struct file_operations rose_routes_fops;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/rose/rose_loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static void rose_loopback_timer(unsigned long param)

skb_reset_transport_header(skb);

sk = rose_find_socket(lci_o, &rose_loopback_neigh);
sk = rose_find_socket(lci_o, rose_loopback_neigh);
if (sk) {
if (rose_process_rx_frame(sk, skb) == 0)
kfree_skb(skb);
Expand All @@ -88,7 +88,7 @@ static void rose_loopback_timer(unsigned long param)

if (frametype == ROSE_CALL_REQUEST) {
if ((dev = rose_dev_get(dest)) != NULL) {
if (rose_rx_call_request(skb, dev, &rose_loopback_neigh, lci_o) == 0)
if (rose_rx_call_request(skb, dev, rose_loopback_neigh, lci_o) == 0)
kfree_skb(skb);
} else {
kfree_skb(skb);
Expand Down
15 changes: 10 additions & 5 deletions trunk/net/rose/rose_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static DEFINE_SPINLOCK(rose_neigh_list_lock);
static struct rose_route *rose_route_list;
static DEFINE_SPINLOCK(rose_route_list_lock);

struct rose_neigh rose_loopback_neigh;
struct rose_neigh *rose_loopback_neigh;

/*
* Add a new route to a node, and in the process add the node and the
Expand Down Expand Up @@ -362,7 +362,12 @@ static int rose_del_node(struct rose_route_struct *rose_route,
*/
void rose_add_loopback_neigh(void)
{
struct rose_neigh *sn = &rose_loopback_neigh;
struct rose_neigh *sn;

rose_loopback_neigh = kmalloc(sizeof(struct rose_neigh), GFP_KERNEL);
if (!rose_loopback_neigh)
return;
sn = rose_loopback_neigh;

sn->callsign = null_ax25_address;
sn->digipeat = NULL;
Expand Down Expand Up @@ -417,13 +422,13 @@ int rose_add_loopback_node(rose_address *address)
rose_node->mask = 10;
rose_node->count = 1;
rose_node->loopback = 1;
rose_node->neighbour[0] = &rose_loopback_neigh;
rose_node->neighbour[0] = rose_loopback_neigh;

/* Insert at the head of list. Address is always mask=10 */
rose_node->next = rose_node_list;
rose_node_list = rose_node;

rose_loopback_neigh.count++;
rose_loopback_neigh->count++;

out:
spin_unlock_bh(&rose_node_list_lock);
Expand Down Expand Up @@ -454,7 +459,7 @@ void rose_del_loopback_node(rose_address *address)

rose_remove_node(rose_node);

rose_loopback_neigh.count--;
rose_loopback_neigh->count--;

out:
spin_unlock_bh(&rose_node_list_lock);
Expand Down

0 comments on commit a95e376

Please sign in to comment.