summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netgraph/ng_ppp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index b2b0cb0..ec3ed82 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -907,7 +907,21 @@ ng_ppp_proto_recv(node_p node, item_p item, uint16_t proto, uint16_t linkNum)
const priv_p priv = NG_NODE_PRIVATE(node);
hook_p outHook = NULL;
int error;
+#ifdef ALIGNED_POINTER
+ struct mbuf *m, *n;
+ NGI_GET_M(item, m);
+ if (!ALIGNED_POINTER(mtod(m, caddr_t), uint32_t)) {
+ n = m_defrag(m, M_NOWAIT);
+ if (n == NULL) {
+ m_freem(m);
+ NG_FREE_ITEM(item);
+ return (ENOBUFS);
+ }
+ m = n;
+ }
+ NGI_M(item) = m;
+#endif /* ALIGNED_POINTER */
switch (proto) {
case PROT_IP:
if (priv->conf.enableIP)
OpenPOWER on IntegriCloud