diff options
-rw-r--r-- | include/net/phonet/pep.h | 1 | ||||
-rw-r--r-- | net/phonet/pep-gprs.c | 4 | ||||
-rw-r--r-- | net/phonet/pep.c | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h index 4c61cdce4e5f..c37162547a93 100644 --- a/include/net/phonet/pep.h +++ b/include/net/phonet/pep.h | |||
@@ -77,6 +77,7 @@ static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb) | |||
77 | 77 | ||
78 | enum { | 78 | enum { |
79 | PNS_PIPE_DATA = 0x20, | 79 | PNS_PIPE_DATA = 0x20, |
80 | PNS_PIPE_ALIGNED_DATA, | ||
80 | 81 | ||
81 | PNS_PEP_CONNECT_REQ = 0x40, | 82 | PNS_PEP_CONNECT_REQ = 0x40, |
82 | PNS_PEP_CONNECT_RESP, | 83 | PNS_PEP_CONNECT_RESP, |
diff --git a/net/phonet/pep-gprs.c b/net/phonet/pep-gprs.c index d183509d3fa6..d01208968c83 100644 --- a/net/phonet/pep-gprs.c +++ b/net/phonet/pep-gprs.c | |||
@@ -96,11 +96,11 @@ static int gprs_recv(struct gprs_dev *gp, struct sk_buff *skb) | |||
96 | goto drop; | 96 | goto drop; |
97 | } | 97 | } |
98 | 98 | ||
99 | if (likely(skb_headroom(skb) & 3)) { | 99 | if (skb_headroom(skb) & 3) { |
100 | struct sk_buff *rskb, *fs; | 100 | struct sk_buff *rskb, *fs; |
101 | int flen = 0; | 101 | int flen = 0; |
102 | 102 | ||
103 | /* Phonet Pipe data header is misaligned (3 bytes), | 103 | /* Phonet Pipe data header may be misaligned (3 bytes), |
104 | * so wrap the IP packet as a single fragment of an head-less | 104 | * so wrap the IP packet as a single fragment of an head-less |
105 | * socket buffer. The network stack will pull what it needs, | 105 | * socket buffer. The network stack will pull what it needs, |
106 | * but at least, the whole IP payload is not memcpy'd. */ | 106 | * but at least, the whole IP payload is not memcpy'd. */ |
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index b6356f3832f6..e23e30907d34 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -354,6 +354,9 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
354 | queue = &pn->ctrlreq_queue; | 354 | queue = &pn->ctrlreq_queue; |
355 | goto queue; | 355 | goto queue; |
356 | 356 | ||
357 | case PNS_PIPE_ALIGNED_DATA: | ||
358 | __skb_pull(skb, 1); | ||
359 | /* fall through */ | ||
357 | case PNS_PIPE_DATA: | 360 | case PNS_PIPE_DATA: |
358 | __skb_pull(skb, 3); /* Pipe data header */ | 361 | __skb_pull(skb, 3); /* Pipe data header */ |
359 | if (!pn_flow_safe(pn->rx_fc)) { | 362 | if (!pn_flow_safe(pn->rx_fc)) { |