diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-03-19 19:13:33 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-03-19 19:13:33 +0300 |
commit | 39c7832eac5f3fe6f58bd188df23e677be8ee9bd (patch) | |
tree | 8b99c1fec9bb7826314c6c7037dd86bba4c5c8e3 | |
parent | 95bef06065ba1a95c3334fcb22cf613776d1433b (diff) | |
download | accel-ppp-39c7832eac5f3fe6f58bd188df23e677be8ee9bd.tar.gz accel-ppp-39c7832eac5f3fe6f58bd188df23e677be8ee9bd.zip |
ipoe: bug fix
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 2 | ||||
-rw-r--r-- | drivers/ipoe/ipoe.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 45677798..12bb2ba7 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -1789,7 +1789,7 @@ static struct ipoe_session *ipoe_session_create_up(struct ipoe_serv *serv, struc ses->username = _strdup(serv->ifname); else { ses->username = _malloc(17); - u_inet_ntoa(iph->saddr, ses->username); + u_inet_ntoa(saddr, ses->username); } ses->ses.chan_name = ses->ctrl.calling_station_id; diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index d787f827..5bafde6a 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -729,7 +729,7 @@ static rx_handler_result_t ipoe_recv(struct sk_buff **pskb) } else if (likely(skb->protocol == htons(ETH_P_ARP))) { noff = skb_network_offset(skb); - if (skb->len != sizeof(*arph)) + if (skb->len < sizeof(*arph)) return RX_HANDLER_PASS; if (!pskb_may_pull(skb, sizeof(*arph) + noff)) |