Commit ebec1711 authored by David S. Miller's avatar David S. Miller

Merge nuts.davemloft.net:/disk1/BK/network-2.6

into nuts.davemloft.net:/disk1/BK/net-2.6
parents d0d0b2da 67fa3c7e
......@@ -1715,7 +1715,8 @@ config NET_POCKET
<file:Documentation/Changes>) and you can say N here.
Laptop users should read the Linux Laptop home page at
<http://www.linux-on-laptops.com/>.
<http://www.linux-on-laptops.com/> or
Tuxmobil - Linux on Mobile Computers at <http://www.tuxmobil.org/>.
Note that the answer to this question doesn't directly affect the
kernel: saying N will just cause the configurator to skip all
......
......@@ -72,8 +72,8 @@ config DMASCC
certain parameters, such as channel access timing, clock mode, and
DMA channel. This is accomplished with a small utility program,
dmascc_cfg, available at
<http://www.nt.tuwien.ac.at/~kkudielk/Linux/>. Please be sure to get
at least version 1.27 of dmascc_cfg, as older versions will not
<http://cacofonix.nt.tuwien.ac.at/~oe1kib/Linux/>. Please be sure to
get at least version 1.27 of dmascc_cfg, as older versions will not
work with the current driver.
config SCC
......@@ -96,8 +96,9 @@ config SCC_DELAY
help
Say Y here if you experience problems with the SCC driver not
working properly; please read
<file:Documentation/networking/z8530drv.txt> for details. If unsure,
say N.
<file:Documentation/networking/z8530drv.txt> for details.
If unsure, say N.
config SCC_TRXECHO
bool "support for TRX that feedback the tx signal to rx"
......@@ -105,7 +106,9 @@ config SCC_TRXECHO
help
Some transmitters feed the transmitted signal back to the receive
line. Say Y here to foil this by explicitly disabling the receiver
during data transmission. If in doubt, say Y.
during data transmission.
If in doubt, say Y.
config BAYCOM_SER_FDX
tristate "BAYCOM ser12 fullduplex driver for AX.25"
......
......@@ -269,7 +269,7 @@ config MA600_DONGLE_OLD
information, download the following tar gzip file.
There is a pre-compiled module on
<http://engsvr.ust.hk/~eetwl95/download/ma600-2.4.x.tar.gz>
<http://engsvr.ust.hk/~eetwl95/ma600.html>
config EP7211_IR
tristate "EP7211 I/R support"
......
......@@ -24,7 +24,6 @@
#define RTF_CACHE 0x01000000 /* cache entry */
#define RTF_FLOW 0x02000000 /* flow significant route */
#define RTF_POLICY 0x04000000 /* policy route */
#define RTF_NDISC 0x08000000 /* ndisc route */
#define RTF_LOCAL 0x80000000
......
......@@ -98,6 +98,7 @@ extern void addrconf_dad_failure(struct inet6_ifaddr *ifp);
extern int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group,
struct in6_addr *src_addr);
extern int ipv6_is_mld(struct sk_buff *skb, int nexthdr);
extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len);
......
......@@ -64,6 +64,7 @@ extern struct rt6_info *rt6_lookup(struct in6_addr *daddr,
extern struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
struct neighbour *neigh,
struct in6_addr *addr,
int (*output)(struct sk_buff *));
extern int ndisc_dst_gc(int *more);
extern void fib6_force_start_gc(void);
......
......@@ -355,6 +355,7 @@ extern int ip6_dst_lookup(struct sock *sk,
*/
extern int ip6_output(struct sk_buff *skb);
extern int ip6_output2(struct sk_buff *skb);
extern int ip6_forward(struct sk_buff *skb);
extern int ip6_input(struct sk_buff *skb);
extern int ip6_mc_input(struct sk_buff *skb);
......
......@@ -374,7 +374,7 @@ static int ethtool_set_ringparam(struct net_device *dev, void *useraddr)
{
struct ethtool_ringparam ringparam;
if (!dev->ethtool_ops->get_ringparam)
if (!dev->ethtool_ops->set_ringparam)
return -EOPNOTSUPP;
if (copy_from_user(&ringparam, useraddr, sizeof(ringparam)))
......
......@@ -1164,8 +1164,7 @@ void neigh_table_init(struct neigh_table *tbl)
if (!tbl->kmem_cachep)
tbl->kmem_cachep = kmem_cache_create(tbl->id,
(tbl->entry_size +
15) & ~15,
tbl->entry_size,
0, SLAB_HWCACHE_ALIGN,
NULL, NULL);
tbl->lock = RW_LOCK_UNLOCKED;
......
......@@ -50,6 +50,8 @@
* Fix refcount off by one if first packet fails, potential null deref,
* memleak 030710- KJP
*
* Fixed unaligned access on IA-64 Grant Grundler <grundler@parisc-linux.org>
*
* See Documentation/networking/pktgen.txt for how to use this.
*/
......@@ -88,7 +90,7 @@
#define cycles() ((u32)get_cycles())
#define VERSION "pktgen version 1.31"
#define VERSION "pktgen version 1.32"
static char version[] __initdata =
"pktgen.c: v1.3: Packet Generator for packet performance testing.\n";
......@@ -193,7 +195,8 @@ struct pktgen_info {
struct pktgen_hdr {
__u32 pgh_magic;
__u32 seq_num;
struct timeval timestamp;
__u32 tv_sec;
__u32 tv_usec;
};
static int cpu_speed;
......@@ -563,11 +566,14 @@ static struct sk_buff *fill_packet(struct net_device *odev, struct pktgen_info*
/* Stamp the time, and sequence number, convert them to network byte order */
if (pgh) {
struct timeval timestamp;
pgh->pgh_magic = htonl(PKTGEN_MAGIC);
do_gettimeofday(&(pgh->timestamp));
pgh->timestamp.tv_usec = htonl(pgh->timestamp.tv_usec);
pgh->timestamp.tv_sec = htonl(pgh->timestamp.tv_sec);
pgh->seq_num = htonl(info->seq_num);
pgh->seq_num = htonl(info->seq_num);
do_gettimeofday(&timestamp);
pgh->tv_sec = htonl(timestamp.tv_sec);
pgh->tv_usec = htonl(timestamp.tv_usec);
}
return skb;
......
......@@ -381,7 +381,7 @@ static int dn_fib_fill_rule(struct sk_buff *skb, struct dn_fib_rule *r, struct n
nlmsg_failure:
rtattr_failure:
skb_put(skb, b - skb->tail);
skb_trim(skb, b - skb->data);
return -1;
}
......
......@@ -438,7 +438,7 @@ static __inline__ int inet_fill_rule(struct sk_buff *skb,
nlmsg_failure:
rtattr_failure:
skb_put(skb, b - skb->tail);
skb_trim(skb, b - skb->data);
return -1;
}
......
......@@ -231,7 +231,7 @@ int ipv6_addr_type(const struct in6_addr *addr)
if ((addr->s6_addr32[0] | addr->s6_addr32[1]) == 0) {
if (addr->s6_addr32[2] == 0) {
if (addr->in6_u.u6_addr32[3] == 0)
if (addr->s6_addr32[3] == 0)
return IPV6_ADDR_ANY;
if (addr->s6_addr32[3] == htonl(0x00000001))
......@@ -1071,7 +1071,7 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
eui[0] ^= 2;
return 0;
case ARPHRD_ARCNET:
/* XXX: inherit EUI-64 fro mother interface -- yoshfuji */
/* XXX: inherit EUI-64 from other interface -- yoshfuji */
if (dev->addr_len != ARCNET_ALEN)
return -1;
memset(eui, 0, 7);
......
......@@ -120,7 +120,7 @@ static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff *skb)
for (curr=procs; curr->type >= 0; curr++) {
if (curr->type == skb->nh.raw[off]) {
/* type specific length/alignment
checks will be perfomed in the
checks will be performed in the
func(). */
if (curr->func(skb, off) == 0)
return 0;
......
......@@ -85,7 +85,7 @@ static struct fib6_node * fib6_repair_tree(struct fib6_node *fn);
/*
* A routing update causes an increase of the serial number on the
* afected subtree. This allows for cached routes to be asynchronously
* affected subtree. This allows for cached routes to be asynchronously
* tested when modifications are made to the destination cache as a
* result of redirects, path MTU changes, etc.
*/
......
......@@ -168,11 +168,19 @@ static inline int ip6_input_finish(struct sk_buff *skb)
smp_read_barrier_depends();
if (ipprot->flags & INET6_PROTO_FINAL) {
struct ipv6hdr *hdr;
if (!cksum_sub && skb->ip_summed == CHECKSUM_HW) {
skb->csum = csum_sub(skb->csum,
csum_partial(skb->nh.raw, skb->h.raw-skb->nh.raw, 0));
cksum_sub++;
}
hdr = skb->nh.ipv6h;
if (ipv6_addr_is_multicast(&hdr->daddr) &&
!ipv6_chk_mcast_addr(skb->dev, &hdr->daddr,
&hdr->saddr) &&
!ipv6_is_mld(skb, nexthdr))
goto discard;
}
if (!(ipprot->flags & INET6_PROTO_NOPOLICY) &&
!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))
......@@ -211,15 +219,14 @@ int ip6_input(struct sk_buff *skb)
int ip6_mc_input(struct sk_buff *skb)
{
struct ipv6hdr *hdr;
int deliver = 0;
int discard = 1;
struct ipv6hdr *hdr;
int deliver;
IP6_INC_STATS_BH(Ip6InMcastPkts);
hdr = skb->nh.ipv6h;
if (ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, &hdr->saddr))
deliver = 1;
deliver = likely(!(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI))) ||
ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
/*
* IPv6 multicast router mode isnt currently supported.
......@@ -238,23 +245,21 @@ int ip6_mc_input(struct sk_buff *skb)
if (deliver) {
skb2 = skb_clone(skb, GFP_ATOMIC);
dst_output(skb2);
} else {
discard = 0;
skb2 = skb;
dst_output(skb);
return 0;
}
dst_output(skb2);
}
}
#endif
if (deliver) {
discard = 0;
if (likely(deliver)) {
ip6_input(skb);
return 0;
}
if (discard)
kfree_skb(skb);
/* discard */
kfree_skb(skb);
return 0;
}
......@@ -399,7 +399,7 @@ void ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
__u16 len;
/* If the packet doesn't contain the original IPv6 header we are
in trouble since we might need the source address for furter
in trouble since we might need the source address for further
processing of the error. */
read_lock(&ip6ip6_lock);
......
......@@ -900,6 +900,33 @@ int ipv6_dev_mc_dec(struct net_device *dev, struct in6_addr *addr)
return err;
}
/*
* identify MLD packets for MLD filter exceptions
*/
int ipv6_is_mld(struct sk_buff *skb, int nexthdr)
{
struct icmp6hdr *pic;
if (nexthdr != IPPROTO_ICMPV6)
return 0;
if (!pskb_may_pull(skb, sizeof(struct icmp6hdr)))
return 0;
pic = (struct icmp6hdr *)skb->h.raw;
switch (pic->icmp6_type) {
case ICMPV6_MGM_QUERY:
case ICMPV6_MGM_REPORT:
case ICMPV6_MGM_REDUCTION:
case ICMPV6_MLD2_REPORT:
return 1;
default:
break;
}
return 0;
}
/*
* check if the interface/address pair is valid
*/
......@@ -918,7 +945,7 @@ int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group,
break;
}
if (mc) {
if (!ipv6_addr_any(src_addr)) {
if (src_addr && !ipv6_addr_any(src_addr)) {
struct ip6_sf_list *psf;
spin_lock_bh(&mc->mca_lock);
......
This diff is collapsed.
......@@ -50,7 +50,7 @@ match(const struct sk_buff *skb,
eui64[0] |= 0x02;
i=0;
while ((skb->nh.ipv6h->saddr.in6_u.u6_addr8[8+i] ==
while ((skb->nh.ipv6h->saddr.s6_addr[8+i] ==
eui64[i]) && (i<8)) i++;
if ( i == 8 )
......
......@@ -222,7 +222,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
}
/* ipv4 addr of the socket is invalid. Only the
* unpecified and mapped address have a v4 equivalent.
* unspecified and mapped address have a v4 equivalent.
*/
v4addr = LOOPBACK4_IPV6;
if (!(addr_type & IPV6_ADDR_MULTICAST)) {
......@@ -306,7 +306,7 @@ static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
* This is next to useless...
* if we demultiplex in network layer we don't need the extra call
* just to queue the skb...
* maybe we could have the network decide uppon a hint if it
* maybe we could have the network decide upon a hint if it
* should call raw_rcv for demultiplexing
*/
int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
......@@ -627,7 +627,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if (ipv6_addr_any(daddr)) {
/*
* unspecfied destination address
* unspecified destination address
* treated as error... is this correct ?
*/
fl6_sock_release(flowlabel);
......
......@@ -223,7 +223,7 @@ static struct rt6_info *rt6_best_dflt(struct rt6_info *rt, int oif)
match = sprt;
mpri = m;
if (m >= 12) {
/* we choose the lastest default router if it
/* we choose the last default router if it
* is in (probably) reachable state.
* If route changed, we should do pmtu
* discovery. --yoshfuji
......@@ -563,6 +563,7 @@ static struct dst_entry *ndisc_dst_gc_list;
struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
struct neighbour *neigh,
struct in6_addr *addr,
int (*output)(struct sk_buff *))
{
struct rt6_info *rt = ip6_dst_alloc();
......@@ -574,11 +575,13 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
dev_hold(dev);
if (neigh)
neigh_hold(neigh);
else
neigh = ndisc_get_neigh(dev, addr);
rt->rt6i_dev = dev;
rt->rt6i_nexthop = neigh;
rt->rt6i_expires = 0;
rt->rt6i_flags = RTF_LOCAL | RTF_NDISC;
rt->rt6i_flags = RTF_LOCAL;
rt->rt6i_metric = 0;
atomic_set(&rt->u.dst.__refcnt, 1);
rt->u.dst.metrics[RTAX_HOPLIMIT-1] = 255;
......@@ -832,7 +835,7 @@ int ip6_route_add(struct in6_rtmsg *rtmsg, struct nlmsghdr *nlh, void *_rtattr)
}
}
rt->rt6i_flags = rtmsg->rtmsg_flags & ~RTF_NDISC;
rt->rt6i_flags = rtmsg->rtmsg_flags;
install_route:
if (rta && rta[RTA_METRICS-1]) {
......@@ -1125,8 +1128,6 @@ static struct rt6_info * ip6_rt_copy(struct rt6_info *ort)
{
struct rt6_info *rt = ip6_dst_alloc();
BUG_ON(ort->rt6i_flags & RTF_NDISC);
if (rt) {
rt->u.dst.input = ort->u.dst.input;
rt->u.dst.output = ort->u.dst.output;
......
......@@ -55,13 +55,6 @@ static struct dst_entry *
__xfrm6_find_bundle(struct flowi *fl, struct rtable *rt, struct xfrm_policy *policy)
{
struct dst_entry *dst;
u32 ndisc_bit = 0;
if (fl->proto == IPPROTO_ICMPV6 &&
(fl->fl_icmp_type == NDISC_NEIGHBOUR_ADVERTISEMENT ||
fl->fl_icmp_type == NDISC_NEIGHBOUR_SOLICITATION ||
fl->fl_icmp_type == NDISC_ROUTER_SOLICITATION))
ndisc_bit = RTF_NDISC;
/* Still not clear if we should set fl->fl6_{src,dst}... */
read_lock_bh(&policy->lock);
......@@ -69,9 +62,6 @@ __xfrm6_find_bundle(struct flowi *fl, struct rtable *rt, struct xfrm_policy *pol
struct xfrm_dst *xdst = (struct xfrm_dst*)dst;
struct in6_addr fl_dst_prefix, fl_src_prefix;
if ((xdst->u.rt6.rt6i_flags & RTF_NDISC) != ndisc_bit)
continue;
ipv6_addr_prefix(&fl_dst_prefix,
&fl->fl6_dst,
xdst->u.rt6.rt6i_dst.plen);
......@@ -169,7 +159,7 @@ __xfrm6_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
dst_prev->output = dst_prev->xfrm->type->output;
/* Sheit... I remember I did this right. Apparently,
* it was magically lost, so this code needs audit */
x->u.rt6.rt6i_flags = rt0->rt6i_flags&(RTCF_BROADCAST|RTCF_MULTICAST|RTCF_LOCAL|RTF_NDISC);
x->u.rt6.rt6i_flags = rt0->rt6i_flags&(RTCF_BROADCAST|RTCF_MULTICAST|RTCF_LOCAL);
x->u.rt6.rt6i_metric = rt0->rt6i_metric;
x->u.rt6.rt6i_node = rt0->rt6i_node;
x->u.rt6.rt6i_gateway = rt0->rt6i_gateway;
......
......@@ -341,6 +341,7 @@ sfq_dequeue(struct Qdisc* sch)
/* Is the slot empty? */
if (q->qs[a].qlen == 0) {
q->ht[q->hash[a]] = SFQ_DEPTH;
a = q->next[a];
if (a == old_a) {
q->tail = SFQ_DEPTH;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment