Skip to content

Commit

Permalink
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPv6]: Fix ICMPv6 redirect handling with target multicast address
  [PKT_SCHED] cls_u32: error code isn't been propogated properly
  [ROSE]: Fix rose.ko oops on unload
  [TCP]: Fix fastpath_cnt_hint when GSO skb is partially ACKed
  • Loading branch information
Linus Torvalds committed Oct 8, 2007
2 parents 87e2831 + bf0b48d commit e46dc1d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion 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
3 changes: 3 additions & 0 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2420,6 +2420,9 @@ static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb,
__u32 dval = min(tp->fackets_out, packets_acked);
tp->fackets_out -= dval;
}
/* hint's skb might be NULL but we don't need to care */
tp->fastpath_cnt_hint -= min_t(u32, packets_acked,
tp->fastpath_cnt_hint);
tp->packets_out -= packets_acked;

BUG_ON(tcp_skb_pcount(skb) == 0);
Expand Down
9 changes: 5 additions & 4 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,9 +1268,10 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)

if (ipv6_addr_equal(dest, target)) {
on_link = 1;
} else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
} else if (ipv6_addr_type(target) !=
(IPV6_ADDR_UNICAST|IPV6_ADDR_LINKLOCAL)) {
ND_PRINTK2(KERN_WARNING
"ICMPv6 Redirect: target address is not link-local.\n");
"ICMPv6 Redirect: target address is not link-local unicast.\n");
return;
}

Expand Down Expand Up @@ -1344,9 +1345,9 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
}

if (!ipv6_addr_equal(&ipv6_hdr(skb)->daddr, target) &&
!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
ipv6_addr_type(target) != (IPV6_ADDR_UNICAST|IPV6_ADDR_LINKLOCAL)) {
ND_PRINTK2(KERN_WARNING
"ICMPv6 Redirect: target address is not link-local.\n");
"ICMPv6 Redirect: target address is not link-local unicast.\n");
return;
}

Expand Down
4 changes: 2 additions & 2 deletions 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 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
2 changes: 1 addition & 1 deletion net/sched/cls_u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base,

#ifdef CONFIG_NET_CLS_IND
if (tb[TCA_U32_INDEV-1]) {
int err = tcf_change_indev(tp, n->indev, tb[TCA_U32_INDEV-1]);
err = tcf_change_indev(tp, n->indev, tb[TCA_U32_INDEV-1]);
if (err < 0)
goto errout;
}
Expand Down

0 comments on commit e46dc1d

Please sign in to comment.