ng_l2tp.c (f8aae7776f85d2fa8aa93f73c37782cd9e1204c6) | ng_l2tp.c (3ca24c284d7116d2764cd8bca4fa357a0bea07db) |
---|---|
1 2/* 3 * Copyright (c) 2001-2002 Packet Design, LLC. 4 * All rights reserved. 5 * 6 * Subject to the following obligations and disclaimer of warranty, 7 * use and redistribution of this software, in source or object code 8 * forms, with or without modifications are expressly permitted by --- 1364 unchanged lines hidden (view full) --- 1373 * Transmit a control stream packet, payload optional. 1374 * The transmit sequence number is not incremented. 1375 */ 1376static int 1377ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns) 1378{ 1379 struct l2tp_seq *const seq = &priv->seq; 1380 u_int16_t session_id = 0; | 1 2/* 3 * Copyright (c) 2001-2002 Packet Design, LLC. 4 * All rights reserved. 5 * 6 * Subject to the following obligations and disclaimer of warranty, 7 * use and redistribution of this software, in source or object code 8 * forms, with or without modifications are expressly permitted by --- 1364 unchanged lines hidden (view full) --- 1373 * Transmit a control stream packet, payload optional. 1374 * The transmit sequence number is not incremented. 1375 */ 1376static int 1377ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns) 1378{ 1379 struct l2tp_seq *const seq = &priv->seq; 1380 u_int16_t session_id = 0; |
1381 meta_p meta = NULL; | |
1382 int error; 1383 1384 /* If no mbuf passed, send an empty packet (ZLB) */ 1385 if (m == NULL) { 1386 1387 /* Create a new mbuf for ZLB packet */ 1388 MGETHDR(m, M_DONTWAIT, MT_DATA); 1389 if (m == NULL) { --- 36 unchanged lines hidden (view full) --- 1426 /* Stop ack timer: we're sending an ack with this packet */ 1427 if (seq->xack_timer_running && callout_stop(&seq->xack_timer) == 1) { 1428 seq->xack_timer_running = 0; 1429 NG_NODE_UNREF(priv->node); 1430 } 1431 seq->xack = seq->nr; 1432 1433 /* Send packet */ | 1381 int error; 1382 1383 /* If no mbuf passed, send an empty packet (ZLB) */ 1384 if (m == NULL) { 1385 1386 /* Create a new mbuf for ZLB packet */ 1387 MGETHDR(m, M_DONTWAIT, MT_DATA); 1388 if (m == NULL) { --- 36 unchanged lines hidden (view full) --- 1425 /* Stop ack timer: we're sending an ack with this packet */ 1426 if (seq->xack_timer_running && callout_stop(&seq->xack_timer) == 1) { 1427 seq->xack_timer_running = 0; 1428 NG_NODE_UNREF(priv->node); 1429 } 1430 seq->xack = seq->nr; 1431 1432 /* Send packet */ |
1434 NG_SEND_DATA(error, priv->lower, m, meta); | 1433 NG_SEND_DATA_ONLY(error, priv->lower, m); |
1435 return (error); 1436} 1437 1438#ifdef INVARIANTS 1439/* 1440 * Sanity check sequence number state. 1441 */ 1442static void --- 34 unchanged lines hidden --- | 1434 return (error); 1435} 1436 1437#ifdef INVARIANTS 1438/* 1439 * Sanity check sequence number state. 1440 */ 1441static void --- 34 unchanged lines hidden --- |