Skip to content

Commit

Permalink
Revert "l2tp: Refactor the codes with existing macros instead of lite…
Browse files Browse the repository at this point in the history
…ral number"

This reverts commit 5ab1fe7.

This change still has problems.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 21, 2016
1 parent 8c14846 commit c1346a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/l2tp/l2tp_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static int pppol2tp_recv_payload_hook(struct sk_buff *skb)
if (!pskb_may_pull(skb, 2))
return 1;

if ((skb->data[0] == PPP_ALLSTATIONS) && (skb->data[1] == PPP_UI))
if ((skb->data[0] == 0xff) && (skb->data[1] == 0x03))
skb_pull(skb, 2);

return 0;
Expand Down Expand Up @@ -282,7 +282,7 @@ static void pppol2tp_session_sock_put(struct l2tp_session *session)
static int pppol2tp_sendmsg(struct socket *sock, struct msghdr *m,
size_t total_len)
{
static const unsigned char ppph[2] = {PPP_ALLSTATIONS, PPP_UI};
static const unsigned char ppph[2] = { 0xff, 0x03 };
struct sock *sk = sock->sk;
struct sk_buff *skb;
int error;
Expand Down Expand Up @@ -369,7 +369,7 @@ static int pppol2tp_sendmsg(struct socket *sock, struct msghdr *m,
*/
static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
{
static const u8 ppph[2] = {PPP_ALLSTATIONS, PPP_UI};
static const u8 ppph[2] = { 0xff, 0x03 };
struct sock *sk = (struct sock *) chan->private;
struct sock *sk_tun;
struct l2tp_session *session;
Expand Down Expand Up @@ -440,7 +440,7 @@ static void pppol2tp_session_close(struct l2tp_session *session)
BUG_ON(session->magic != L2TP_SESSION_MAGIC);

if (sock) {
inet_shutdown(sock, SEND_SHUTDOWN);
inet_shutdown(sock, 2);
/* Don't let the session go away before our socket does */
l2tp_session_inc_refcount(session);
}
Expand Down

0 comments on commit c1346a7

Please sign in to comment.