* [GIT PULL nf] IPVS
From: Simon Horman @ 2013-01-28 1:18 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Hans Schillstrom, Hans Schillstrom,
Jesper Dangaard Brouer, Dan Carpenter
Hi Pablo,
please consider the following fix for IPVS patch for 3.8.
I believe that the problem was introduced in 3.4 and thus
this fix is appropriate for 3.4, 3.5, 3.6 and 3.7 -stable.
----------------------------------------------------------------
The following changes since commit 5b76c4948fe6977bead2359c2054f3e6a2dcf3d0:
netfilter: x_tables: print correct hook names for ARP (2013-01-13 12:54:12 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
for you to fetch changes up to b425df4cdd953a400d814b4474c9d3ec04481858:
ipvs: freeing uninitialized pointer on error (2013-01-28 10:14:37 +0900)
----------------------------------------------------------------
Dan Carpenter (1):
ipvs: freeing uninitialized pointer on error
net/netfilter/ipvs/ip_vs_sync.c | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply
* Re: [PATCH] SCTP: Free the per-net sysctl table on net exit.
From: David Miller @ 2013-01-28 0:35 UTC (permalink / raw)
To: vyasevich; +Cc: netdev, linux-sctp, mmokrejs, ebiederm
In-Reply-To: <1359043367-30180-1-git-send-email-vyasevich@gmail.com>
From: Vlad Yasevich <vyasevich@gmail.com>
Date: Thu, 24 Jan 2013 11:02:47 -0500
> @@ -366,7 +366,11 @@ int sctp_sysctl_net_register(struct net *net)
>
> void sctp_sysctl_net_unregister(struct net *net)
> {
> + struct ctl_table *table;
> +
> + table = net->sctp.sysctl_hdr->ctl_table_arg;
> unregister_net_sysctl_table(net->sctp.sysctl_header);
> + kfree(table);
> }
In what tree does this compile? I tried both 'net' and 'net-next'
and got the same exact result:
net/sctp/sysctl.c: In function ‘sctp_sysctl_net_unregister’:
net/sctp/sysctl.c:371:19: error: ‘struct netns_sctp’ has no member named ‘sysctl_hdr’
make[1]: *** [net/sctp/sysctl.o] Error 1
make: *** [net/sctp/sysctl.o] Error 2
^ permalink raw reply
* Re: [PATCH v2] sctp: set association state to established in dupcook_a handler
From: David Miller @ 2013-01-28 0:32 UTC (permalink / raw)
To: vyasevich; +Cc: xufengzhang.main, nhorman, linux-sctp, netdev, linux-kernel
In-Reply-To: <51014DC1.4070209@gmail.com>
From: Vlad Yasevich <vyasevich@gmail.com>
Date: Thu, 24 Jan 2013 10:05:37 -0500
> On 01/23/2013 09:44 PM, xufengzhang.main@gmail.com wrote:
>> From: Xufeng Zhang <xufeng.zhang@windriver.com>
>>
>> While sctp handling a duplicate COOKIE-ECHO and the action is
>> 'Association restart', sctp_sf_do_dupcook_a() will processing
>> the unexpected COOKIE-ECHO for peer restart, but it does not set
>> the association state to SCTP_STATE_ESTABLISHED, so the association
>> could stuck in SCTP_STATE_SHUTDOWN_PENDING state forever.
>> This violates the sctp specification:
>> RFC 4960 5.2.4. Handle a COOKIE ECHO when a TCB Exists
>> Action
>> A) In this case, the peer may have restarted. .....
>> After this, the endpoint shall enter the ESTABLISHED state.
>>
>> To resolve this problem, adding a SCTP_CMD_NEW_STATE cmd to the
>> command list before SCTP_CMD_REPLY cmd, this will set the restart
>> association to SCTP_STATE_ESTABLISHED state properly and also avoid
>> I-bit being set in the DATA chunk header when COOKIE_ACK is bundled
>> with DATA chunks.
>>
>> Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
>
> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Applied, thanks everyone.
^ permalink raw reply
* Re: [patch] ip6mr: limit IPv6 MRT_TABLE identifiers
From: David Miller @ 2013-01-28 0:31 UTC (permalink / raw)
To: dan.carpenter; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, kernel-janitors
In-Reply-To: <20130124063834.GA5611@elgon.mountain>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 24 Jan 2013 09:38:34 +0300
> We did this for IPv4 in b49d3c1e1c "net: ipmr: limit MRT_TABLE
> identifiers" but we need to do it for IPv6 as well. On IPv6 the name
> is "pim6reg" instead of "pimreg" so there is one less digit allowed.
>
> The strcpy() is in ip6mr_reg_vif().
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks Dan.
^ permalink raw reply
* Re: [PATCH net 1/1] r8169: fix vlan tag read ordering.
From: David Miller @ 2013-01-28 0:29 UTC (permalink / raw)
To: romieu; +Cc: netdev, hayeswang, timo.teras
In-Reply-To: <20130124233006.GA7511@electric-eye.fr.zoreil.com>
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Fri, 25 Jan 2013 00:30:06 +0100
> Control of receive descriptor must not be returned to ethernet chipset
> before vlan tag processing is done.
>
> VLAN tag receive word is now reset both in normal and error path.
>
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
> Spotted-by: Timo Teras <timo.teras@iki.fi>
> Cc: Hayes Wang <hayeswang@realtek.com>
Applied.
^ permalink raw reply
* Re: [PATCH] net: cdc_ncm: use IAD provided by the USB core
From: David Miller @ 2013-01-28 0:28 UTC (permalink / raw)
To: bjorn; +Cc: netdev, linux-usb, oliver, gsuarez, alexey.orishko
In-Reply-To: <1359193020-12873-1-git-send-email-bjorn@mork.no>
From: Bjørn Mork <bjorn@mork.no>
Date: Sat, 26 Jan 2013 10:36:59 +0100
> commit 9992c2e (net: cdc_ncm: workaround for missing CDC Union)
> added code to lookup an IAD for the interface we are probing.
> This is redundant. The USB core has already done the lookup
> and saved the result in the USB interface struct. Use that
> instead.
>
> Cc: Greg Suarez <gsuarez@smithmicro.com>
> Cc: Alexey Orishko <alexey.orishko@stericsson.com>
> Signed-off-by: Bjørn Mork <bjorn@mork.no>
Applied to 'net'.
^ permalink raw reply
* Re: [PATCH] net: loopback: fix a dst refcounting issue
From: David Miller @ 2013-01-28 0:26 UTC (permalink / raw)
To: eric.dumazet; +Cc: greearb, netdev
In-Reply-To: <1359307508.5222.2226.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 27 Jan 2013 09:25:08 -0800
> On Sun, 2013-01-27 at 01:32 -0500, David Miller wrote:
>
>> Applied, I suspect we need to tree wide audit for other instances of
>> this situation. Probably greps for skb_orphan() would be a good
>> start.
>
> I highly suspect macvlan needs a skb_dst_drop(), but couldnt trigger
> a case to trigger the fault.
I completely agree, when we hit the ->forward() or ->receive() method
we are leaving the RCU safety zone for the cached dst.
Even if you can't trigger it, this seems clear enough to me that we
should put those skb_dst_drop() calls in, so please formally submit
that patch you posted for Ben as an RFC last week.
Thanks.
^ permalink raw reply
* Re: [PATCH] gro: Fix kcalloc argument order
From: David Miller @ 2013-01-28 0:13 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel, eric.dumazet
In-Reply-To: <1359228259.2079.30.camel@joe-AO722>
From: Joe Perches <joe@perches.com>
Date: Sat, 26 Jan 2013 11:24:19 -0800
> First number, then size.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Good catch, since this bug doesn't cause any real functional problem
I've applied the patch to net-next.
Thanks.
^ permalink raw reply
* Re: pull request: batman-adv 2013-01-27
From: David Miller @ 2013-01-28 0:11 UTC (permalink / raw)
To: ordex; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <1359315839-24136-1-git-send-email-ordex@autistici.org>
From: Antonio Quartulli <ordex@autistici.org>
Date: Sun, 27 Jan 2013 20:43:56 +0100
> This is a small patchset intended for net/linux-3.8.
> Here there are three small patches from Matthias Schiffer aimed to fix some
> memory problems in the recently introduced D.A.T. component. One of them is
> fixing an skb memleak, one is fixing the ARP filter routine by preventing DAT to
> parse not useful messages (so reducing the amount of memory used by the local
> cache) and one fixing again the ARP filter routine by preventing DAT to
> overwrite correct entries with bogus ones in the local cache.
>
> Please pull or let me know if there is any problem.
Pulled, thanks Antonio.
^ permalink raw reply
* Re: [net-next 00/14][pull request] Intel Wired LAN Driver Updates 2013.01.27
From: David Miller @ 2013-01-28 0:07 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann, bruce.w.allan
In-Reply-To: <1359283193-2043-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sun, 27 Jan 2013 02:39:39 -0800
> This series contains updates to e1000e only. All the updates come
> from Bruce Allan and most of the patch fix or enable features on
> i217/i218. Most notably is patch 03 "e1000e: add support for IEEE-1588
> PTP", which is v2 of the patch based on feedback from Stephen Hemminger.
>
> Also patch 04 "e1000e: enable ECC on I217/I218 to catch packet buffer
> memory errors" should be queued up for stable (as well as net) trees, but
> the patch does not apply cleanly to either of those trees currently.
> So I will work with Bruce to provide a version of the patch which will
> apply cleanly to net (and stable) and we can queue it up at that point
> for stable 3.5 tree.
>
> The remaining patches are general cleanups of the code.
Thanks, please provide more commentary like this in future
pull requests, it helps me a lot and it does get added to the
merge commit I make when I pull from your tree.
>
> The following are changes since commit 031554eab078705edb96e9a39665597e3fd22781:
> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [PATCH] checkpatch.pl: Fix warnings on code comments
From: David Miller @ 2013-01-27 23:59 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: apw, linux-kernel, netdev
In-Reply-To: <1359286539-18395-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sun, 27 Jan 2013 03:35:39 -0800
> Produces warnings on code comments which follow the Linux coding style
> guide. While the desired code comment style for networking my differ
> from the rest of the kernel, both styles should be permitted.
I was actually going to mention to you guys that I've been lackadasical
about enforcing the comment style I want with the Intel drivers.
That was a mistake, I should have enforced it strictly, as I do for
the other drivers and the core networking code, from the beginning.
And it's clearly a mistake if you feel the need to take out the very
checkpatch working that's meant to enforce this comment style in all
of the networking drivers and core.
Do not revert this, follow it's advice instead.
^ permalink raw reply
* Re: Potential problem in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process()
From: Guenter Roeck @ 2013-01-27 23:52 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-wireless, netdev, Chaoming Li, John W. Linville
In-Reply-To: <5105A627.5000208@lwfinger.net>
On Sun, Jan 27, 2013 at 04:11:51PM -0600, Larry Finger wrote:
> On 01/27/2013 03:18 PM, Guenter Roeck wrote:
> >Hi all,
> >
> >while browsing through 'warning: variable ‘...’ set but not used' warnings, I
> >found the following code in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process().
> >
> > while (!skb_queue_empty(&rx_queue)) {
> > _skb = skb_dequeue(&rx_queue);
> > _rtl_usb_rx_process_agg(hw, skb);
> > ieee80211_rx_irqsafe(hw, skb);
> > }
> >
> >Question: Should the parameter to _rtl_usb_rx_process_agg() and
> >ieee80211_rx_irqsafe() be '_skb' instead of 'skb' ?
>
> I think you are right and I will submit a patch to fix this.
>
> What compiler version reported this? I use "gcc (SUSE Linux) 4.7.2
> 20130108 [gcc-4_7-branch revision 195012]" and I do not see this
> warning.
>
Hi Larry,
I use "gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2".
You'll see the warning if you build the kernel with W=1.
Guenter
^ permalink raw reply
* [PATCH] ip_gre: When TOS is inherited, use configured TOS value for non-IP packets
From: David Ward @ 2013-01-27 23:04 UTC (permalink / raw)
To: netdev; +Cc: Timo Teras, David Ward
A GRE tunnel can be configured so that outgoing tunnel packets inherit
the value of the TOS field from the inner IP header. In doing so, when
a non-IP packet is transmitted through the tunnel, the TOS field will
always be set to 0.
Instead, the user should be able to configure a different TOS value as
the fallback to use for non-IP packets. This is helpful when the non-IP
packets are all control packets and should be handled by routers outside
the tunnel as having Internet Control precedence. One example of this is
the NHRP packets that control a DMVPN-compatible mGRE tunnel; they are
encapsulated directly by GRE and do not contain an inner IP header.
Under the existing behavior, the IFLA_GRE_TOS parameter must be set to
'1' for the TOS value to be inherited. Now, only the least significant
bit of this parameter must be set to '1', and when a non-IP packet is
sent through the tunnel, the upper 6 bits of this same parameter will be
copied into the TOS field. (The ECN bits get masked off as before.)
This behavior is backwards-compatible with existing configurations and
iproute2 versions.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
net/ipv4/ip_gre.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 303012a..e4c8817 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -818,8 +818,8 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
ttl = tiph->ttl;
tos = tiph->tos;
- if (tos == 1) {
- tos = 0;
+ if (tos & 0x1) {
+ tos &= ~0x1;
if (skb->protocol == htons(ETH_P_IP))
tos = old_iph->tos;
else if (skb->protocol == htons(ETH_P_IPV6))
--
1.7.1
^ permalink raw reply related
* [PATCH iproute2] ip/iptunnel: Extend TOS syntax
From: David Ward @ 2013-01-27 23:04 UTC (permalink / raw)
To: netdev; +Cc: Timo Teras, David Ward
In-Reply-To: <1359327899-8153-1-git-send-email-david.ward@ll.mit.edu>
The 'inherit/STRING' or 'inherit/00..ff' syntax indicates that the
TOS field of tunneled packets should be copied from the original IP
header, but for non-IP packets the value STRING or 00..ff should be
used instead. (This syntax is already used by 'ip tunnel show'.)
Also clarify the man page and the command usage text (particularly
that the TOS is not specified as a decimal number).
Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
ip/iptunnel.c | 15 +++++++++++----
man/man8/ip-tunnel.8 | 34 +++++++++++++++++++++-------------
2 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/ip/iptunnel.c b/ip/iptunnel.c
index 0cf6cf8..f8b91ba 100644
--- a/ip/iptunnel.c
+++ b/ip/iptunnel.c
@@ -41,7 +41,7 @@ static void usage(void)
fprintf(stderr, "\n");
fprintf(stderr, "Where: NAME := STRING\n");
fprintf(stderr, " ADDR := { IP_ADDRESS | any }\n");
- fprintf(stderr, " TOS := { NUMBER | inherit }\n");
+ fprintf(stderr, " TOS := { STRING | 00..ff | inherit | inherit/STRING | inherit/00..ff }\n");
fprintf(stderr, " TTL := { 1..255 | inherit }\n");
fprintf(stderr, " KEY := { DOTTED_QUAD | NUMBER }\n");
exit(-1);
@@ -188,14 +188,21 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
} else if (strcmp(*argv, "tos") == 0 ||
strcmp(*argv, "tclass") == 0 ||
matches(*argv, "dsfield") == 0) {
+ char *dsfield;
__u32 uval;
NEXT_ARG();
+ dsfield = *argv;
+ strsep(&dsfield, "/");
if (strcmp(*argv, "inherit") != 0) {
- if (rtnl_dsfield_a2n(&uval, *argv))
- invarg("bad TOS value", *argv);
- p->iph.tos = uval;
+ dsfield = *argv;
+ p->iph.tos = 0;
} else
p->iph.tos = 1;
+ if (dsfield) {
+ if (rtnl_dsfield_a2n(&uval, dsfield))
+ invarg("bad TOS value", *argv);
+ p->iph.tos |= uval;
+ }
} else {
if (strcmp(*argv, "name") == 0) {
NEXT_ARG();
diff --git a/man/man8/ip-tunnel.8 b/man/man8/ip-tunnel.8
index 37ba542..b408517 100644
--- a/man/man8/ip-tunnel.8
+++ b/man/man8/ip-tunnel.8
@@ -47,7 +47,6 @@ ip-tunnel - tunnel configuration
.RB "[ [" no "]" pmtudisc " ]"
.RB "[ " dev
.IR PHYS_DEV " ]"
-.RB "[ " "dscp inherit" " ]"
.ti -8
.IR MODE " := "
@@ -58,8 +57,12 @@ ip-tunnel - tunnel configuration
.BR any " }"
.ti -8
-.IR TOS " := { " NUMBER " |"
-.BR inherit " }"
+.IR TOS " := { " STRING " | " 00 ".." ff " |"
+.BR inherit " |"
+.BI "inherit/" STRING
+.R " |"
+.BI "inherit/" 00 ".." ff
+.R " }"
.ti -8
.IR ELIM " := {"
@@ -132,11 +135,21 @@ The default value for IPv6 tunnels is:
.BI dsfield " T"
.TP
.BI tclass " T"
-set a fixed TOS (or traffic class in IPv6)
-.I T
-on tunneled packets.
-The default value is:
-.BR "inherit" .
+set the type of service (IPv4) or traffic class (IPv6) field on
+tunneled packets, which can be specified as either a two-digit
+hex value (e.g. c0) or a predefined string (e.g. internet).
+The value
+.B inherit
+causes the field to be copied from the original IP header. The
+values
+.BI "inherit/" STRING
+or
+.BI "inherit/" 00 ".." ff
+will set the field to
+.I STRING
+or
+.IR 00 ".." ff
+when tunneling non-IP packets. The default value is 00.
.TP
.BI dev " NAME"
@@ -202,11 +215,6 @@ flag is equivalent to the combination
.B It isn't work. Don't use it.
.TP
-.BR "dscp inherit"
-.RB ( " only IPv6 tunnels " )
-Inherit DS field between inner and outer header.
-
-.TP
.BI encaplim " ELIM"
.RB ( " only IPv6 tunnels " )
set a fixed encapsulation limit. Default is 4.
--
1.7.1
^ permalink raw reply related
* Re: [RFC:] struct net_device_ops: Add function pointer to fill device specific ndisc information
From: Stefan Richter @ 2013-01-27 23:26 UTC (permalink / raw)
To: YOSHIFUJI Hideaki; +Cc: netdev, linux1394-devel, David Miller
In-Reply-To: <51057FEF.9090006@linux-ipv6.org>
On Jan 28 YOSHIFUJI Hideaki wrote:
> Stephan Gatzka wrote:
>
> >> I am not a contributor to net/, hence don't have a say over how the
> >> networking APIs should evolve.
> >>
> >> Any solution is fine with me, as long as net/ does not use any definitions
> >> or declarations from <linux/firewire.h>.
> >
> > O.k. then I will go for Yoshifujis "extended hwaddress" approch.
> >
> > I think I will divide all the stuff into two major pieces:
> >
> > First I will rewrite the existing IPv4 over Firewire driver to use the notification mechanisms and also generate the RFC2734 ARP packets in the arp code.
> >
> > Then I'll implement the IPv6 stuff based on that IPv4 solution.
>
> I even think that we do not need to have event notification if we
> can just use max_rec, sspd and fifo embedded in the destination
> "MAC address" in the sending packet.
Yes and no. After a bus topology change, it takes a brief period for
firewire-core to have the new node(s) scanned and tell firewire-net about
them, so that firewire-net can add (or remove) items in the list for the
mapping between GUID on one hand and card:generation:nodeID on the other
hand.
So, right after a bus reset, we may already receive IP packets from nodes
which firewire-core didn't process yet. But I guess this short period
isn't really a problem.
By the way, I wouldn't trust max_rec and sspd from 1394-ARP or 1394-NDP
packets. These should rather be taken from firewire-core's bus analysis
as soon as this is complete. Only unicast_FIFO can alas not be obtained
by bus analysis. (IEEE 1394 addendum B:2002 made things more complicated
with regard to maximum payload and maximum transmission speed then they
were until addendum A:2000, in ways that the authors of RFC 2374 and 3146
surely could not anticipate.)
--
Stefan Richter
-=====-===-= ---= ===--
http://arcgraph.de/sr/
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
^ permalink raw reply
* [PATCH] mwifiex: avoid out of bounds access in mwifiex_get_common_rates.
From: Cyril Roelandt @ 2013-01-27 22:42 UTC (permalink / raw)
To: bzhao, linville
Cc: linux-wireless, netdev, linux-kernel, kernel-janitors,
Cyril Roelandt
Check that the array indexes are in-bounds before accessing the rate2 and tmp
arrays.
Found with the following semantic patch:
<smpl>
@@
identifier t;
identifier idx;
expression E;
statement S;
@@
* for (... ; <+... t[idx] ...+> && idx < E ; ...)
S
</smpl>
Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
---
drivers/net/wireless/mwifiex/join.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index 893d809..f0a634d 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -157,8 +157,8 @@ static int mwifiex_get_common_rates(struct mwifiex_private *priv, u8 *rate1,
memset(rate1, 0, rate1_size);
- for (i = 0; rate2[i] && i < rate2_size; i++) {
- for (j = 0; tmp[j] && j < rate1_size; j++) {
+ for (i = 0; i < rate2_size && rate2[i]; i++) {
+ for (j = 0; j < rate1_size && tmp[j]; j++) {
/* Check common rate, excluding the bit for
basic rate */
if ((rate2[i] & 0x7F) == (tmp[j] & 0x7F)) {
--
1.7.10.4
^ permalink raw reply related
* [PATCH NEXT] rtlwifi: Eliminate two empty routines
From: Larry Finger @ 2013-01-27 22:40 UTC (permalink / raw)
To: linville-2XuSBdqkA4R54TAoqtyWWQ
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Larry Finger,
netdev-u79uwXL29TY76Z2rM5mHXA
Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
---
drivers/net/wireless/rtlwifi/rc.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rc.c b/drivers/net/wireless/rtlwifi/rc.c
index c1e065f..204f46c 100644
--- a/drivers/net/wireless/rtlwifi/rc.c
+++ b/drivers/net/wireless/rtlwifi/rc.c
@@ -217,19 +217,6 @@ static void rtl_tx_status(void *ppriv,
}
}
-static void rtl_rate_init(void *ppriv,
- struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta, void *priv_sta)
-{
-}
-
-static void rtl_rate_update(void *ppriv,
- struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta, void *priv_sta,
- u32 changed)
-{
-}
^ permalink raw reply related
* [PATCH] dm9601: support dm9620 variant
From: Peter Korsgaard @ 2013-01-27 22:34 UTC (permalink / raw)
To: netdev, davem, slawek; +Cc: Peter Korsgaard
dm9620 is a newer variant of dm9601 with more features (usb 2.0, checksum
offload, ..), but it can also be put in a dm9601 compatible mode, allowing
us to reuse the existing driver.
This does mean that the extended features like checksum offload cannot be
used, but that's hardly critical on a 100mbps interface.
Thanks to Sławek Wernikowski <slawek@wernikowski.net> for providing me
with a dm9620 based device to test.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
drivers/net/usb/dm9601.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 8670a53..174e5ec 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -45,6 +45,12 @@
#define DM_MCAST_ADDR 0x16 /* 8 bytes */
#define DM_GPR_CTRL 0x1e
#define DM_GPR_DATA 0x1f
+#define DM_CHIP_ID 0x2c
+#define DM_MODE_CTRL 0x91 /* only on dm9620 */
+
+/* chip id values */
+#define ID_DM9601 0
+#define ID_DM9620 1
#define DM_MAX_MCAST 64
#define DM_MCAST_SIZE 8
@@ -348,7 +354,7 @@ static const struct net_device_ops dm9601_netdev_ops = {
static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
{
int ret;
- u8 mac[ETH_ALEN];
+ u8 mac[ETH_ALEN], id;
ret = usbnet_get_endpoints(dev, intf);
if (ret)
@@ -389,6 +395,24 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
__dm9601_set_mac_address(dev);
}
+ if (dm_read_reg(dev, DM_CHIP_ID, &id) < 0) {
+ netdev_err(dev->net, "Error reading chip ID\n");
+ ret = -ENODEV;
+ goto out;
+ }
+
+ /* put dm9620 devices in dm9601 mode */
+ if (id == ID_DM9620) {
+ u8 mode;
+
+ if (dm_read_reg(dev, DM_MODE_CTRL, &mode) < 0) {
+ netdev_err(dev->net, "Error reading MODE_CTRL\n");
+ ret = -ENODEV;
+ goto out;
+ }
+ dm_write_reg(dev, DM_MODE_CTRL, mode & 0x7f);
+ }
+
/* power up phy */
dm_write_reg(dev, DM_GPR_CTRL, 1);
dm_write_reg(dev, DM_GPR_DATA, 0);
@@ -571,6 +595,10 @@ static const struct usb_device_id products[] = {
USB_DEVICE(0x0a46, 0x9000), /* DM9000E */
.driver_info = (unsigned long)&dm9601_info,
},
+ {
+ USB_DEVICE(0x0a46, 0x9620), /* DM9620 USB to Fast Ethernet Adapter */
+ .driver_info = (unsigned long)&dm9601_info,
+ },
{}, // END
};
--
1.7.10.4
^ permalink raw reply related
* [PATCH] rtlwifi: Fix the usage of the wrong variable in usb.c
From: Larry Finger @ 2013-01-27 22:24 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Larry Finger, netdev, Guenter Roeck, Stable
In routine _rtl_rx_pre_process(), skb_dequeue() is called to get an skb;
however, the wrong variable name is used in subsequent calls.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Stable <stable@vger.kernel.org>
---
John,
This is material for 3.8. Sorry that it was not found earlier.
Larry
---
drivers/net/wireless/rtlwifi/usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index f2ecdeb..1535efd 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -542,8 +542,8 @@ static void _rtl_rx_pre_process(struct ieee80211_hw *hw, struct sk_buff *skb)
WARN_ON(skb_queue_empty(&rx_queue));
while (!skb_queue_empty(&rx_queue)) {
_skb = skb_dequeue(&rx_queue);
- _rtl_usb_rx_process_agg(hw, skb);
- ieee80211_rx_irqsafe(hw, skb);
+ _rtl_usb_rx_process_agg(hw, _skb);
+ ieee80211_rx_irqsafe(hw, _skb);
}
}
--
1.8.1
^ permalink raw reply related
* Re: Potential problem in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process()
From: Larry Finger @ 2013-01-27 22:11 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Chaoming Li, John W. Linville
In-Reply-To: <20130127211811.GA6680-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
On 01/27/2013 03:18 PM, Guenter Roeck wrote:
> Hi all,
>
> while browsing through 'warning: variable ‘...’ set but not used' warnings, I
> found the following code in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process().
>
> while (!skb_queue_empty(&rx_queue)) {
> _skb = skb_dequeue(&rx_queue);
> _rtl_usb_rx_process_agg(hw, skb);
> ieee80211_rx_irqsafe(hw, skb);
> }
>
> Question: Should the parameter to _rtl_usb_rx_process_agg() and
> ieee80211_rx_irqsafe() be '_skb' instead of 'skb' ?
I think you are right and I will submit a patch to fix this.
What compiler version reported this? I use "gcc (SUSE Linux) 4.7.2 20130108
[gcc-4_7-branch revision 195012]" and I do not see this warning.
Thanks,
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Potential problem in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process()
From: Guenter Roeck @ 2013-01-27 21:18 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Cc: Larry Finger, Chaoming Li, John W. Linville
Hi all,
while browsing through 'warning: variable ‘...’ set but not used' warnings, I
found the following code in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process().
while (!skb_queue_empty(&rx_queue)) {
_skb = skb_dequeue(&rx_queue);
_rtl_usb_rx_process_agg(hw, skb);
ieee80211_rx_irqsafe(hw, skb);
}
Question: Should the parameter to _rtl_usb_rx_process_agg() and
ieee80211_rx_irqsafe() be '_skb' instead of 'skb' ?
Thanks,
Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 3/3] batman-adv: filter ARP packets with invalid MAC addresses in DAT
From: Antonio Quartulli @ 2013-01-27 19:43 UTC (permalink / raw)
To: davem
Cc: netdev, b.a.t.m.a.n, Matthias Schiffer, Marek Lindner,
Antonio Quartulli
In-Reply-To: <1359315839-24136-1-git-send-email-ordex@autistici.org>
From: Matthias Schiffer <mschiffer@universe-factory.net>
We never want multicast MAC addresses in the Distributed ARP Table, so it's
best to completely ignore ARP packets containing them where we expect unicast
addresses.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
net/batman-adv/distributed-arp-table.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index be3be28..ea0bd31 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -738,6 +738,7 @@ static uint16_t batadv_arp_get_type(struct batadv_priv *bat_priv,
struct arphdr *arphdr;
struct ethhdr *ethhdr;
__be32 ip_src, ip_dst;
+ uint8_t *hw_src, *hw_dst;
uint16_t type = 0;
/* pull the ethernet header */
@@ -782,6 +783,18 @@ static uint16_t batadv_arp_get_type(struct batadv_priv *bat_priv,
ipv4_is_zeronet(ip_dst) || ipv4_is_lbcast(ip_dst))
goto out;
+ hw_src = batadv_arp_hw_src(skb, hdr_size);
+ if (is_zero_ether_addr(hw_src) || is_multicast_ether_addr(hw_src))
+ goto out;
+
+ /* we don't care about the destination MAC address in ARP requests */
+ if (arphdr->ar_op != htons(ARPOP_REQUEST)) {
+ hw_dst = batadv_arp_hw_dst(skb, hdr_size);
+ if (is_zero_ether_addr(hw_dst) ||
+ is_multicast_ether_addr(hw_dst))
+ goto out;
+ }
+
type = ntohs(arphdr->ar_op);
out:
return type;
--
1.8.1.1
^ permalink raw reply related
* [PATCH 2/3] batman-adv: check for more types of invalid IP addresses in DAT
From: Antonio Quartulli @ 2013-01-27 19:43 UTC (permalink / raw)
To: davem
Cc: netdev, b.a.t.m.a.n, Matthias Schiffer, Marek Lindner,
Antonio Quartulli
In-Reply-To: <1359315839-24136-1-git-send-email-ordex@autistici.org>
From: Matthias Schiffer <mschiffer@universe-factory.net>
There are more types of IP addresses that may appear in ARP packets that we
don't want to process. While some of these should never appear in sane ARP
packets, a 0.0.0.0 source is used for duplicate address detection and thus seen
quite often.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
net/batman-adv/distributed-arp-table.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index 9f4cff3..be3be28 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -777,7 +777,9 @@ static uint16_t batadv_arp_get_type(struct batadv_priv *bat_priv,
ip_src = batadv_arp_ip_src(skb, hdr_size);
ip_dst = batadv_arp_ip_dst(skb, hdr_size);
if (ipv4_is_loopback(ip_src) || ipv4_is_multicast(ip_src) ||
- ipv4_is_loopback(ip_dst) || ipv4_is_multicast(ip_dst))
+ ipv4_is_loopback(ip_dst) || ipv4_is_multicast(ip_dst) ||
+ ipv4_is_zeronet(ip_src) || ipv4_is_lbcast(ip_src) ||
+ ipv4_is_zeronet(ip_dst) || ipv4_is_lbcast(ip_dst))
goto out;
type = ntohs(arphdr->ar_op);
--
1.8.1.1
^ permalink raw reply related
* [PATCH 1/3] batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()
From: Antonio Quartulli @ 2013-01-27 19:43 UTC (permalink / raw)
To: davem
Cc: netdev, b.a.t.m.a.n, Matthias Schiffer, Marek Lindner,
Antonio Quartulli
In-Reply-To: <1359315839-24136-1-git-send-email-ordex@autistici.org>
From: Matthias Schiffer <mschiffer@universe-factory.net>
The callers of batadv_dat_snoop_incoming_arp_reply() assume the skb has been
freed when it returns true; fix this by calling kfree_skb before returning as
it is done in batadv_dat_snoop_incoming_arp_request().
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
net/batman-adv/distributed-arp-table.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index 7485a78..9f4cff3 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -1012,6 +1012,8 @@ bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,
*/
ret = !batadv_is_my_client(bat_priv, hw_dst);
out:
+ if (ret)
+ kfree_skb(skb);
/* if ret == false -> packet has to be delivered to the interface */
return ret;
}
--
1.8.1.1
^ permalink raw reply related
* pull request: batman-adv 2013-01-27
From: Antonio Quartulli @ 2013-01-27 19:43 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n
This is a small patchset intended for net/linux-3.8.
Here there are three small patches from Matthias Schiffer aimed to fix some
memory problems in the recently introduced D.A.T. component. One of them is
fixing an skb memleak, one is fixing the ARP filter routine by preventing DAT to
parse not useful messages (so reducing the amount of memory used by the local
cache) and one fixing again the ARP filter routine by preventing DAT to
overwrite correct entries with bogus ones in the local cache.
Please pull or let me know if there is any problem.
Thanks a lot,
Antonio
The following changes since commit 1591ab6740326aaf41e194c43bdf8ece6e2e4835:
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless (2013-01-27 01:37:22 -0500)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batman-adv-fix-for-davem
for you to fetch changes up to b618ad1103c9ea0c4a69b44f42fc3c7b4e231e22:
batman-adv: filter ARP packets with invalid MAC addresses in DAT (2013-01-27 14:02:39 +0100)
----------------------------------------------------------------
Included changes ares:
- fix an skb memleak in DAT
- fix the ARP filtering routine in DAT by preventing bogus entries to overwrite
already existing ones in the local cache.
- fix the ARP filtering routine in DAT by preventing it to parse and add to the
cache bogus entries
----------------------------------------------------------------
Matthias Schiffer (3):
batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()
batman-adv: check for more types of invalid IP addresses in DAT
batman-adv: filter ARP packets with invalid MAC addresses in DAT
net/batman-adv/distributed-arp-table.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox