netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
To: jon.maloy-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org
Cc: allan.stephens-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 3/5] tipc: set skb->protocol in eth_media packet transmission
Date: Wed,  3 Apr 2013 14:43:28 +0200	[thread overview]
Message-ID: <1364993010-15515-4-git-send-email-kaber@trash.net> (raw)
In-Reply-To: <1364993010-15515-1-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>

The skb->protocol field is used by packet classifiers and for AF_PACKET
cooked format, TIPC needs to set it properly.

Fixes packet classification and ethertype of 0x0000 in cooked captures:

Out 20:c9:d0:43:12:d9 ethertype Unknown (0x0000), length 56:
	0x0000:  5b50 0028 0000 30d4 0100 1000 0100 1001  [P.(..0.........
	0x0010:  0000 03e8 0000 0001 20c9 d043 12d9 0000  ...........C....
	0x0020:  0000 0000 0000 0000                      ........

Signed-off-by: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
---
 net/tipc/eth_media.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c
index 0648819..120a676 100644
--- a/net/tipc/eth_media.c
+++ b/net/tipc/eth_media.c
@@ -111,6 +111,7 @@ static int send_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr,
 
 	skb_reset_network_header(clone);
 	clone->dev = dev;
+	clone->protocol = htons(ETH_P_TIPC);
 	dev_hard_header(clone, dev, ETH_P_TIPC, dest->value,
 			dev->dev_addr, clone->len);
 	dev_queue_xmit(clone);
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-04-03 12:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 12:43 [PATCH RFC 0/5] tipc: add support for TIPC over InfiniBand Patrick McHardy
2013-04-03 12:43 ` [PATCH 2/5] tipc: move bcast_addr from struct tipc_media to struct tipc_bearer Patrick McHardy
     [not found] ` <1364993010-15515-1-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2013-04-03 12:43   ` [PATCH 1/5] tipc: remove unused str2addr media callback Patrick McHardy
2013-04-03 12:43   ` Patrick McHardy [this message]
2013-04-03 12:43   ` [PATCH 4/5] tipc: add InfiniBand media type Patrick McHardy
2013-04-03 14:41     ` Erik Hugne
2013-04-03 14:49       ` Patrick McHardy
     [not found]     ` <1364993010-15515-5-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2013-04-07  9:07       ` Ying Xue
     [not found]         ` <51613740.6050501-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2013-04-07 12:04           ` Patrick McHardy
2013-04-07  9:19       ` Bart Van Assche
2013-04-07  9:43         ` Patrick McHardy
2013-04-03 12:43   ` [PATCH 5/5] IPoIB: add support for TIPC protocol Patrick McHardy
     [not found]     ` <1364993010-15515-6-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2013-04-03 15:31       ` Or Gerlitz
2013-04-03 15:44         ` Patrick McHardy
2013-04-03 19:44   ` [PATCH RFC 0/5] tipc: add support for TIPC over InfiniBand Jon Maloy
  -- strict thread matches above, loose matches on Subject: below --
2013-04-17 16:18 [PATCH v2 0/5] tipc: add TIPC over Infiniband support Patrick McHardy
2013-04-17 16:18 ` [PATCH 3/5] tipc: set skb->protocol in eth_media packet transmission Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364993010-15515-4-git-send-email-kaber@trash.net \
    --to=kaber-dcujhnylwpneowh0uzbu5w@public.gmane.org \
    --cc=allan.stephens-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jon.maloy-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).