glebius requested changes to this revision.
glebius added a comment.
This revision now requires changes to proceed.


  I got few minor comments.

INLINE COMMENTS

> ng_pppoe.c:1135
> +                     /* Generate a packet of that type. */
> +                     MGETHDR(m, M_NOWAIT, MT_DATA);
> +                     if (m == NULL)

This is deprecated macro. Please use m_gethdr(M_NOWAIT, MT_DATA);

> ng_pppoe.c:1144
> +
> +                             m->m_pkthdr.rcvif = NULL;
> +                             m->m_pkthdr.len = m->m_len = sizeof(*wh);

This is already done by the allocator. Not needed.

> ng_pppoe.c:1145
> +                             m->m_pkthdr.rcvif = NULL;
> +                             m->m_pkthdr.len = m->m_len = sizeof(*wh);
> +                             wh = mtod(m, struct pppoe_full_hdr *);

Looks like m_pkthdr.len is never read before it is overwritten later in L1167.

> ng_pppoe.c:1180
> +                     /* Generate a packet of that type. */
> +                     MGETHDR(m, M_NOWAIT, MT_DATA);
> +                     if (m == NULL)

Same comments on this block as on SEND_HURL.

REPOSITORY
  rS FreeBSD src repository

REVISION DETAIL
  https://reviews.freebsd.org/D9270

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: ale, #manpages, wblock, #network, julian, mav, adrian, glebius
Cc: glebius, wblock, mav, poolroom_gmail.com, mandree, imp, freebsd-net-list
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to