You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git/
This commit is contained in:
@@ -87,8 +87,7 @@ static void z_comp_free(void *arg)
|
||||
|
||||
if (state) {
|
||||
zlib_deflateEnd(&state->strm);
|
||||
if (state->strm.workspace)
|
||||
vfree(state->strm.workspace);
|
||||
vfree(state->strm.workspace);
|
||||
kfree(state);
|
||||
}
|
||||
}
|
||||
@@ -308,8 +307,7 @@ static void z_decomp_free(void *arg)
|
||||
|
||||
if (state) {
|
||||
zlib_inflateEnd(&state->strm);
|
||||
if (state->strm.workspace)
|
||||
kfree(state->strm.workspace);
|
||||
kfree(state->strm.workspace);
|
||||
kfree(state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2467,14 +2467,10 @@ static void ppp_destroy_interface(struct ppp *ppp)
|
||||
skb_queue_purge(&ppp->mrq);
|
||||
#endif /* CONFIG_PPP_MULTILINK */
|
||||
#ifdef CONFIG_PPP_FILTER
|
||||
if (ppp->pass_filter) {
|
||||
kfree(ppp->pass_filter);
|
||||
ppp->pass_filter = NULL;
|
||||
}
|
||||
if (ppp->active_filter) {
|
||||
kfree(ppp->active_filter);
|
||||
ppp->active_filter = NULL;
|
||||
}
|
||||
kfree(ppp->pass_filter);
|
||||
ppp->pass_filter = NULL;
|
||||
kfree(ppp->active_filter);
|
||||
ppp->active_filter = NULL;
|
||||
#endif /* CONFIG_PPP_FILTER */
|
||||
|
||||
kfree(ppp);
|
||||
|
||||
@@ -436,9 +436,7 @@ static int cycx_wan_new_if(struct wan_device *wandev, struct net_device *dev,
|
||||
}
|
||||
|
||||
if (err) {
|
||||
if (chan->local_addr)
|
||||
kfree(chan->local_addr);
|
||||
|
||||
kfree(chan->local_addr);
|
||||
kfree(chan);
|
||||
return err;
|
||||
}
|
||||
@@ -458,9 +456,7 @@ static int cycx_wan_del_if(struct wan_device *wandev, struct net_device *dev)
|
||||
struct cycx_x25_channel *chan = dev->priv;
|
||||
|
||||
if (chan->svc) {
|
||||
if (chan->local_addr)
|
||||
kfree(chan->local_addr);
|
||||
|
||||
kfree(chan->local_addr);
|
||||
if (chan->state == WAN_CONNECTED)
|
||||
del_timer(&chan->timer);
|
||||
}
|
||||
|
||||
+11
-16
@@ -400,10 +400,8 @@ static void cpc_tty_close(struct tty_struct *tty, struct file *flip)
|
||||
cpc_tty->buf_rx.last = NULL;
|
||||
}
|
||||
|
||||
if (cpc_tty->buf_tx) {
|
||||
kfree(cpc_tty->buf_tx);
|
||||
cpc_tty->buf_tx = NULL;
|
||||
}
|
||||
kfree(cpc_tty->buf_tx);
|
||||
cpc_tty->buf_tx = NULL;
|
||||
|
||||
CPC_TTY_DBG("%s: TTY closed\n",cpc_tty->name);
|
||||
|
||||
@@ -666,7 +664,7 @@ static void cpc_tty_rx_work(void * data)
|
||||
unsigned long port;
|
||||
int i, j;
|
||||
st_cpc_tty_area *cpc_tty;
|
||||
volatile st_cpc_rx_buf * buf;
|
||||
volatile st_cpc_rx_buf *buf;
|
||||
char flags=0,flg_rx=1;
|
||||
struct tty_ldisc *ld;
|
||||
|
||||
@@ -680,9 +678,9 @@ static void cpc_tty_rx_work(void * data)
|
||||
cpc_tty = &cpc_tty_area[port];
|
||||
|
||||
if ((buf=cpc_tty->buf_rx.first) != 0) {
|
||||
if(cpc_tty->tty) {
|
||||
if (cpc_tty->tty) {
|
||||
ld = tty_ldisc_ref(cpc_tty->tty);
|
||||
if(ld) {
|
||||
if (ld) {
|
||||
if (ld->receive_buf) {
|
||||
CPC_TTY_DBG("%s: call line disc. receive_buf\n",cpc_tty->name);
|
||||
ld->receive_buf(cpc_tty->tty, (char *)(buf->data), &flags, buf->size);
|
||||
@@ -691,7 +689,7 @@ static void cpc_tty_rx_work(void * data)
|
||||
}
|
||||
}
|
||||
cpc_tty->buf_rx.first = cpc_tty->buf_rx.first->next;
|
||||
kfree((unsigned char *)buf);
|
||||
kfree(buf);
|
||||
buf = cpc_tty->buf_rx.first;
|
||||
flg_rx = 1;
|
||||
}
|
||||
@@ -733,7 +731,7 @@ static void cpc_tty_rx_disc_frame(pc300ch_t *pc300chan)
|
||||
|
||||
void cpc_tty_receive(pc300dev_t *pc300dev)
|
||||
{
|
||||
st_cpc_tty_area *cpc_tty;
|
||||
st_cpc_tty_area *cpc_tty;
|
||||
pc300ch_t *pc300chan = (pc300ch_t *)pc300dev->chan;
|
||||
pc300_t *card = (pc300_t *)pc300chan->card;
|
||||
int ch = pc300chan->channel;
|
||||
@@ -742,7 +740,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
|
||||
int rx_len, rx_aux;
|
||||
volatile unsigned char status;
|
||||
unsigned short first_bd = pc300chan->rx_first_bd;
|
||||
st_cpc_rx_buf *new=NULL;
|
||||
st_cpc_rx_buf *new = NULL;
|
||||
unsigned char dsr_rx;
|
||||
|
||||
if (pc300dev->cpc_tty == NULL) {
|
||||
@@ -762,7 +760,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
|
||||
if (status & DST_EOM) {
|
||||
break;
|
||||
}
|
||||
ptdescr=(pcsca_bd_t __iomem *)(card->hw.rambase+cpc_readl(&ptdescr->next));
|
||||
ptdescr = (pcsca_bd_t __iomem *)(card->hw.rambase+cpc_readl(&ptdescr->next));
|
||||
}
|
||||
|
||||
if (!rx_len) {
|
||||
@@ -771,10 +769,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
|
||||
cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch),
|
||||
RX_BD_ADDR(ch, pc300chan->rx_last_bd));
|
||||
}
|
||||
if (new) {
|
||||
kfree(new);
|
||||
new = NULL;
|
||||
}
|
||||
kfree(new);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -787,7 +782,7 @@ void cpc_tty_receive(pc300dev_t *pc300dev)
|
||||
continue;
|
||||
}
|
||||
|
||||
new = (st_cpc_rx_buf *) kmalloc(rx_len + sizeof(st_cpc_rx_buf), GFP_ATOMIC);
|
||||
new = (st_cpc_rx_buf *)kmalloc(rx_len + sizeof(st_cpc_rx_buf), GFP_ATOMIC);
|
||||
if (new == 0) {
|
||||
cpc_tty_rx_disc_frame(pc300chan);
|
||||
continue;
|
||||
|
||||
@@ -3664,15 +3664,10 @@ static void wanpipe_tty_close(struct tty_struct *tty, struct file * filp)
|
||||
chdlc_disable_comm_shutdown(card);
|
||||
unlock_adapter_irq(&card->wandev.lock,&smp_flags);
|
||||
|
||||
if (card->tty_buf){
|
||||
kfree(card->tty_buf);
|
||||
card->tty_buf=NULL;
|
||||
}
|
||||
|
||||
if (card->tty_rx){
|
||||
kfree(card->tty_rx);
|
||||
card->tty_rx=NULL;
|
||||
}
|
||||
kfree(card->tty_buf);
|
||||
card->tty_buf = NULL;
|
||||
kfree(card->tty_rx);
|
||||
card->tty_rx = NULL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,13 +107,9 @@ static struct x25_asy *x25_asy_alloc(void)
|
||||
static void x25_asy_free(struct x25_asy *sl)
|
||||
{
|
||||
/* Free all X.25 frame buffers. */
|
||||
if (sl->rbuff) {
|
||||
kfree(sl->rbuff);
|
||||
}
|
||||
kfree(sl->rbuff);
|
||||
sl->rbuff = NULL;
|
||||
if (sl->xbuff) {
|
||||
kfree(sl->xbuff);
|
||||
}
|
||||
kfree(sl->xbuff);
|
||||
sl->xbuff = NULL;
|
||||
|
||||
if (!test_and_clear_bit(SLF_INUSE, &sl->flags)) {
|
||||
@@ -134,10 +130,8 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu)
|
||||
{
|
||||
printk("%s: unable to grow X.25 buffers, MTU change cancelled.\n",
|
||||
dev->name);
|
||||
if (xbuff != NULL)
|
||||
kfree(xbuff);
|
||||
if (rbuff != NULL)
|
||||
kfree(rbuff);
|
||||
kfree(xbuff);
|
||||
kfree(rbuff);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -169,10 +163,8 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu)
|
||||
|
||||
spin_unlock_bh(&sl->lock);
|
||||
|
||||
if (xbuff != NULL)
|
||||
kfree(xbuff);
|
||||
if (rbuff != NULL)
|
||||
kfree(rbuff);
|
||||
kfree(xbuff);
|
||||
kfree(rbuff);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,10 +89,14 @@ enum {
|
||||
RTM_GETANYCAST = 62,
|
||||
#define RTM_GETANYCAST RTM_GETANYCAST
|
||||
|
||||
RTM_MAX,
|
||||
#define RTM_MAX RTM_MAX
|
||||
__RTM_MAX,
|
||||
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
|
||||
};
|
||||
|
||||
#define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE)
|
||||
#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
|
||||
#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
|
||||
|
||||
/*
|
||||
Generic structure for encapsulation of optional route information.
|
||||
It is reminiscent of sockaddr, but with sa_family replaced
|
||||
|
||||
@@ -140,8 +140,11 @@ enum {
|
||||
XFRM_MSG_FLUSHPOLICY,
|
||||
#define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY
|
||||
|
||||
XFRM_MSG_MAX
|
||||
__XFRM_MSG_MAX
|
||||
};
|
||||
#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)
|
||||
|
||||
#define XFRM_NR_MSGTYPES (XFRM_MSG_MAX + 1 - XFRM_MSG_BASE)
|
||||
|
||||
struct xfrm_user_tmpl {
|
||||
struct xfrm_id id;
|
||||
|
||||
@@ -46,6 +46,7 @@ struct prefix_info {
|
||||
#include <linux/in6.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/if_inet6.h>
|
||||
#include <net/ipv6.h>
|
||||
|
||||
#define IN6_ADDR_HSIZE 16
|
||||
|
||||
|
||||
@@ -157,7 +157,8 @@ psched_tod_diff(int delta_sec, int bound)
|
||||
case 1: \
|
||||
__delta += 1000000; \
|
||||
case 0: \
|
||||
__delta = abs(__delta); \
|
||||
if (__delta > bound || __delta < 0) \
|
||||
__delta = bound; \
|
||||
} \
|
||||
__delta; \
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _NET_XFRM_H
|
||||
#define _NET_XFRM_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/xfrm.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/list.h>
|
||||
@@ -516,6 +517,15 @@ struct xfrm_dst
|
||||
u32 child_mtu_cached;
|
||||
};
|
||||
|
||||
static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
|
||||
{
|
||||
dst_release(xdst->route);
|
||||
if (likely(xdst->u.dst.xfrm))
|
||||
xfrm_state_put(xdst->u.dst.xfrm);
|
||||
}
|
||||
|
||||
extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
|
||||
|
||||
/* Decapsulation state, used by the input to store data during
|
||||
* decapsulation procedure, to be used later (during the policy
|
||||
* check
|
||||
|
||||
+8
-11
@@ -427,7 +427,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
/* Get message from skb (based on rtnetlink_rcv_skb). Each message is
|
||||
* processed by audit_receive_msg. Malformed skbs with wrong length are
|
||||
* discarded silently. */
|
||||
static int audit_receive_skb(struct sk_buff *skb)
|
||||
static void audit_receive_skb(struct sk_buff *skb)
|
||||
{
|
||||
int err;
|
||||
struct nlmsghdr *nlh;
|
||||
@@ -436,7 +436,7 @@ static int audit_receive_skb(struct sk_buff *skb)
|
||||
while (skb->len >= NLMSG_SPACE(0)) {
|
||||
nlh = (struct nlmsghdr *)skb->data;
|
||||
if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
|
||||
return 0;
|
||||
return;
|
||||
rlen = NLMSG_ALIGN(nlh->nlmsg_len);
|
||||
if (rlen > skb->len)
|
||||
rlen = skb->len;
|
||||
@@ -446,23 +446,20 @@ static int audit_receive_skb(struct sk_buff *skb)
|
||||
netlink_ack(skb, nlh, 0);
|
||||
skb_pull(skb, rlen);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Receive messages from netlink socket. */
|
||||
static void audit_receive(struct sock *sk, int length)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
unsigned int qlen;
|
||||
|
||||
if (down_trylock(&audit_netlink_sem))
|
||||
return;
|
||||
down(&audit_netlink_sem);
|
||||
|
||||
/* FIXME: this must not cause starvation */
|
||||
while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
|
||||
if (audit_receive_skb(skb) && skb->len)
|
||||
skb_queue_head(&sk->sk_receive_queue, skb);
|
||||
else
|
||||
kfree_skb(skb);
|
||||
for (qlen = skb_queue_len(&sk->sk_receive_queue); qlen; qlen--) {
|
||||
skb = skb_dequeue(&sk->sk_receive_queue);
|
||||
audit_receive_skb(skb);
|
||||
kfree_skb(skb);
|
||||
}
|
||||
up(&audit_netlink_sem);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/if.h>
|
||||
#include <net/sock.h>
|
||||
#include <net/pkt_sched.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/spinlock.h>
|
||||
@@ -74,6 +75,12 @@ void linkwatch_run_queue(void)
|
||||
clear_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state);
|
||||
|
||||
if (dev->flags & IFF_UP) {
|
||||
if (netif_carrier_ok(dev)) {
|
||||
WARN_ON(dev->qdisc_sleeping == &noop_qdisc);
|
||||
dev_activate(dev);
|
||||
} else
|
||||
dev_deactivate(dev);
|
||||
|
||||
netdev_state_change(dev);
|
||||
}
|
||||
|
||||
|
||||
+2
-15
@@ -217,21 +217,10 @@ void nf_debug_ip_local_deliver(struct sk_buff *skb)
|
||||
* NF_IP_RAW_INPUT and NF_IP_PRE_ROUTING. */
|
||||
if (!skb->dev) {
|
||||
printk("ip_local_deliver: skb->dev is NULL.\n");
|
||||
}
|
||||
else if (strcmp(skb->dev->name, "lo") == 0) {
|
||||
if (skb->nf_debug != ((1 << NF_IP_LOCAL_OUT)
|
||||
| (1 << NF_IP_POST_ROUTING)
|
||||
| (1 << NF_IP_PRE_ROUTING)
|
||||
| (1 << NF_IP_LOCAL_IN))) {
|
||||
printk("ip_local_deliver: bad loopback skb: ");
|
||||
debug_print_hooks_ip(skb->nf_debug);
|
||||
nf_dump_skb(PF_INET, skb);
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (skb->nf_debug != ((1<<NF_IP_PRE_ROUTING)
|
||||
| (1<<NF_IP_LOCAL_IN))) {
|
||||
printk("ip_local_deliver: bad non-lo skb: ");
|
||||
printk("ip_local_deliver: bad skb: ");
|
||||
debug_print_hooks_ip(skb->nf_debug);
|
||||
nf_dump_skb(PF_INET, skb);
|
||||
}
|
||||
@@ -247,8 +236,6 @@ void nf_debug_ip_loopback_xmit(struct sk_buff *newskb)
|
||||
debug_print_hooks_ip(newskb->nf_debug);
|
||||
nf_dump_skb(PF_INET, newskb);
|
||||
}
|
||||
/* Clear to avoid confusing input check */
|
||||
newskb->nf_debug = 0;
|
||||
}
|
||||
|
||||
void nf_debug_ip_finish_output2(struct sk_buff *skb)
|
||||
|
||||
+38
-29
@@ -86,30 +86,33 @@ struct sock *rtnl;
|
||||
|
||||
struct rtnetlink_link * rtnetlink_links[NPROTO];
|
||||
|
||||
static const int rtm_min[(RTM_MAX+1-RTM_BASE)/4] =
|
||||
static const int rtm_min[RTM_NR_FAMILIES] =
|
||||
{
|
||||
NLMSG_LENGTH(sizeof(struct ifinfomsg)),
|
||||
NLMSG_LENGTH(sizeof(struct ifaddrmsg)),
|
||||
NLMSG_LENGTH(sizeof(struct rtmsg)),
|
||||
NLMSG_LENGTH(sizeof(struct ndmsg)),
|
||||
NLMSG_LENGTH(sizeof(struct rtmsg)),
|
||||
NLMSG_LENGTH(sizeof(struct tcmsg)),
|
||||
NLMSG_LENGTH(sizeof(struct tcmsg)),
|
||||
NLMSG_LENGTH(sizeof(struct tcmsg)),
|
||||
NLMSG_LENGTH(sizeof(struct tcamsg))
|
||||
[RTM_FAM(RTM_NEWLINK)] = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
|
||||
[RTM_FAM(RTM_NEWADDR)] = NLMSG_LENGTH(sizeof(struct ifaddrmsg)),
|
||||
[RTM_FAM(RTM_NEWROUTE)] = NLMSG_LENGTH(sizeof(struct rtmsg)),
|
||||
[RTM_FAM(RTM_NEWNEIGH)] = NLMSG_LENGTH(sizeof(struct ndmsg)),
|
||||
[RTM_FAM(RTM_NEWRULE)] = NLMSG_LENGTH(sizeof(struct rtmsg)),
|
||||
[RTM_FAM(RTM_NEWQDISC)] = NLMSG_LENGTH(sizeof(struct tcmsg)),
|
||||
[RTM_FAM(RTM_NEWTCLASS)] = NLMSG_LENGTH(sizeof(struct tcmsg)),
|
||||
[RTM_FAM(RTM_NEWTFILTER)] = NLMSG_LENGTH(sizeof(struct tcmsg)),
|
||||
[RTM_FAM(RTM_NEWACTION)] = NLMSG_LENGTH(sizeof(struct tcamsg)),
|
||||
[RTM_FAM(RTM_NEWPREFIX)] = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
|
||||
[RTM_FAM(RTM_GETMULTICAST)] = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
|
||||
[RTM_FAM(RTM_GETANYCAST)] = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
|
||||
};
|
||||
|
||||
static const int rta_max[(RTM_MAX+1-RTM_BASE)/4] =
|
||||
static const int rta_max[RTM_NR_FAMILIES] =
|
||||
{
|
||||
IFLA_MAX,
|
||||
IFA_MAX,
|
||||
RTA_MAX,
|
||||
NDA_MAX,
|
||||
RTA_MAX,
|
||||
TCA_MAX,
|
||||
TCA_MAX,
|
||||
TCA_MAX,
|
||||
TCAA_MAX
|
||||
[RTM_FAM(RTM_NEWLINK)] = IFLA_MAX,
|
||||
[RTM_FAM(RTM_NEWADDR)] = IFA_MAX,
|
||||
[RTM_FAM(RTM_NEWROUTE)] = RTA_MAX,
|
||||
[RTM_FAM(RTM_NEWNEIGH)] = NDA_MAX,
|
||||
[RTM_FAM(RTM_NEWRULE)] = RTA_MAX,
|
||||
[RTM_FAM(RTM_NEWQDISC)] = TCA_MAX,
|
||||
[RTM_FAM(RTM_NEWTCLASS)] = TCA_MAX,
|
||||
[RTM_FAM(RTM_NEWTFILTER)] = TCA_MAX,
|
||||
[RTM_FAM(RTM_NEWACTION)] = TCAA_MAX,
|
||||
};
|
||||
|
||||
void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data)
|
||||
@@ -606,27 +609,33 @@ static inline int rtnetlink_rcv_skb(struct sk_buff *skb)
|
||||
|
||||
/*
|
||||
* rtnetlink input queue processing routine:
|
||||
* - try to acquire shared lock. If it is failed, defer processing.
|
||||
* - process as much as there was in the queue upon entry.
|
||||
* - feed skbs to rtnetlink_rcv_skb, until it refuse a message,
|
||||
* that will occur, when a dump started and/or acquisition of
|
||||
* exclusive lock failed.
|
||||
* that will occur, when a dump started.
|
||||
*/
|
||||
|
||||
static void rtnetlink_rcv(struct sock *sk, int len)
|
||||
{
|
||||
unsigned int qlen = skb_queue_len(&sk->sk_receive_queue);
|
||||
|
||||
do {
|
||||
struct sk_buff *skb;
|
||||
|
||||
if (rtnl_shlock_nowait())
|
||||
return;
|
||||
rtnl_lock();
|
||||
|
||||
while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) {
|
||||
if (qlen > skb_queue_len(&sk->sk_receive_queue))
|
||||
qlen = skb_queue_len(&sk->sk_receive_queue);
|
||||
|
||||
for (; qlen; qlen--) {
|
||||
skb = skb_dequeue(&sk->sk_receive_queue);
|
||||
if (rtnetlink_rcv_skb(skb)) {
|
||||
if (skb->len)
|
||||
skb_queue_head(&sk->sk_receive_queue,
|
||||
skb);
|
||||
else
|
||||
else {
|
||||
kfree_skb(skb);
|
||||
qlen--;
|
||||
}
|
||||
break;
|
||||
}
|
||||
kfree_skb(skb);
|
||||
@@ -635,10 +644,10 @@ static void rtnetlink_rcv(struct sock *sk, int len)
|
||||
up(&rtnl_sem);
|
||||
|
||||
netdev_run_todo();
|
||||
} while (rtnl && rtnl->sk_receive_queue.qlen);
|
||||
} while (qlen);
|
||||
}
|
||||
|
||||
static struct rtnetlink_link link_rtnetlink_table[RTM_MAX-RTM_BASE+1] =
|
||||
static struct rtnetlink_link link_rtnetlink_table[RTM_NR_MSGTYPES] =
|
||||
{
|
||||
[RTM_GETLINK - RTM_BASE] = { .dumpit = rtnetlink_dump_ifinfo },
|
||||
[RTM_SETLINK - RTM_BASE] = { .doit = do_setlink },
|
||||
|
||||
+13
-12
@@ -1411,21 +1411,22 @@ static struct file_operations dn_dev_seq_fops = {
|
||||
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
static struct rtnetlink_link dnet_rtnetlink_table[RTM_MAX-RTM_BASE+1] =
|
||||
static struct rtnetlink_link dnet_rtnetlink_table[RTM_NR_MSGTYPES] =
|
||||
{
|
||||
[4] = { .doit = dn_dev_rtm_newaddr, },
|
||||
[5] = { .doit = dn_dev_rtm_deladdr, },
|
||||
[6] = { .dumpit = dn_dev_dump_ifaddr, },
|
||||
|
||||
[RTM_NEWADDR - RTM_BASE] = { .doit = dn_dev_rtm_newaddr, },
|
||||
[RTM_DELADDR - RTM_BASE] = { .doit = dn_dev_rtm_deladdr, },
|
||||
[RTM_GETADDR - RTM_BASE] = { .dumpit = dn_dev_dump_ifaddr, },
|
||||
#ifdef CONFIG_DECNET_ROUTER
|
||||
[8] = { .doit = dn_fib_rtm_newroute, },
|
||||
[9] = { .doit = dn_fib_rtm_delroute, },
|
||||
[10] = { .doit = dn_cache_getroute, .dumpit = dn_fib_dump, },
|
||||
[16] = { .doit = dn_fib_rtm_newrule, },
|
||||
[17] = { .doit = dn_fib_rtm_delrule, },
|
||||
[18] = { .dumpit = dn_fib_dump_rules, },
|
||||
[RTM_NEWROUTE - RTM_BASE] = { .doit = dn_fib_rtm_newroute, },
|
||||
[RTM_DELROUTE - RTM_BASE] = { .doit = dn_fib_rtm_delroute, },
|
||||
[RTM_GETROUTE - RTM_BASE] = { .doit = dn_cache_getroute,
|
||||
.dumpit = dn_fib_dump, },
|
||||
[RTM_NEWRULE - RTM_BASE] = { .doit = dn_fib_rtm_newrule, },
|
||||
[RTM_DELRULE - RTM_BASE] = { .doit = dn_fib_rtm_delrule, },
|
||||
[RTM_GETRULE - RTM_BASE] = { .dumpit = dn_fib_dump_rules, },
|
||||
#else
|
||||
[10] = { .doit = dn_cache_getroute, .dumpit = dn_cache_dump, },
|
||||
[RTM_GETROUTE - RTM_BASE] = { .doit = dn_cache_getroute,
|
||||
.dumpit = dn_cache_dump,
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -119,8 +119,9 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
|
||||
static void dnrmg_receive_user_sk(struct sock *sk, int len)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
unsigned int qlen = skb_queue_len(&sk->sk_receive_queue);
|
||||
|
||||
while((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) {
|
||||
for (; qlen && (skb = skb_dequeue(&sk->sk_receive_queue)); qlen--) {
|
||||
dnrmg_receive_user_skb(skb);
|
||||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
+11
-10
@@ -1107,17 +1107,18 @@ static void rtmsg_ifa(int event, struct in_ifaddr* ifa)
|
||||
}
|
||||
}
|
||||
|
||||
static struct rtnetlink_link inet_rtnetlink_table[RTM_MAX - RTM_BASE + 1] = {
|
||||
[4] = { .doit = inet_rtm_newaddr, },
|
||||
[5] = { .doit = inet_rtm_deladdr, },
|
||||
[6] = { .dumpit = inet_dump_ifaddr, },
|
||||
[8] = { .doit = inet_rtm_newroute, },
|
||||
[9] = { .doit = inet_rtm_delroute, },
|
||||
[10] = { .doit = inet_rtm_getroute, .dumpit = inet_dump_fib, },
|
||||
static struct rtnetlink_link inet_rtnetlink_table[RTM_NR_MSGTYPES] = {
|
||||
[RTM_NEWADDR - RTM_BASE] = { .doit = inet_rtm_newaddr, },
|
||||
[RTM_DELADDR - RTM_BASE] = { .doit = inet_rtm_deladdr, },
|
||||
[RTM_GETADDR - RTM_BASE] = { .dumpit = inet_dump_ifaddr, },
|
||||
[RTM_NEWROUTE - RTM_BASE] = { .doit = inet_rtm_newroute, },
|
||||
[RTM_DELROUTE - RTM_BASE] = { .doit = inet_rtm_delroute, },
|
||||
[RTM_GETROUTE - RTM_BASE] = { .doit = inet_rtm_getroute,
|
||||
.dumpit = inet_dump_fib, },
|
||||
#ifdef CONFIG_IP_MULTIPLE_TABLES
|
||||
[16] = { .doit = inet_rtm_newrule, },
|
||||
[17] = { .doit = inet_rtm_delrule, },
|
||||
[18] = { .dumpit = inet_dump_rules, },
|
||||
[RTM_NEWRULE - RTM_BASE] = { .doit = inet_rtm_newrule, },
|
||||
[RTM_DELRULE - RTM_BASE] = { .doit = inet_rtm_delrule, },
|
||||
[RTM_GETRULE - RTM_BASE] = { .dumpit = inet_dump_rules, },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb)
|
||||
#ifdef CONFIG_NETFILTER_DEBUG
|
||||
nf_debug_ip_loopback_xmit(newskb);
|
||||
#endif
|
||||
nf_reset(newskb);
|
||||
netif_rx(newskb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -819,6 +819,7 @@ static int tcp_error(struct sk_buff *skb,
|
||||
*/
|
||||
/* FIXME: Source route IP option packets --RR */
|
||||
if (hooknum == NF_IP_PRE_ROUTING
|
||||
&& skb->ip_summed != CHECKSUM_UNNECESSARY
|
||||
&& csum_tcpudp_magic(iph->saddr, iph->daddr, tcplen, IPPROTO_TCP,
|
||||
skb->ip_summed == CHECKSUM_HW ? skb->csum
|
||||
: skb_checksum(skb, iph->ihl*4, tcplen, 0))) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user