Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166235336
D37602.id114124.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37602.id114124.diff
View Options
diff --git a/sys/net/if_ovpn.h b/sys/net/if_ovpn.h
--- a/sys/net/if_ovpn.h
+++ b/sys/net/if_ovpn.h
@@ -62,7 +62,7 @@
#define OVPN_DEL_KEY _IO ('D', 6)
#define OVPN_SET_PEER _IO ('D', 7)
#define OVPN_START_VPN _IO ('D', 8)
-#define OVPN_SEND_PKT _IO ('D', 9)
+/* OVPN_SEND_PKT _IO ('D', 9) */
#define OVPN_POLL_PKT _IO ('D', 10)
#define OVPN_GET_PKT _IO ('D', 11)
#define OVPN_SET_IFMODE _IO ('D', 12)
diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -932,55 +932,6 @@
return (0);
}
-static int
-ovpn_send_pkt(struct ifnet *ifp, const nvlist_t *nvl)
-{
- struct epoch_tracker et;
- struct ovpn_softc *sc = ifp->if_softc;
- struct mbuf *m;
- const uint8_t *pkt;
- size_t pktlen;
- uint32_t peerid;
- int ret;
-
- if (nvl == NULL)
- return (EINVAL);
-
- if (! nvlist_exists_binary(nvl, "packet"))
- return (EINVAL);
- pkt = nvlist_get_binary(nvl, "packet", &pktlen);
-
- if (! nvlist_exists_number(nvl, "peerid"))
- return (EINVAL);
-
- peerid = nvlist_get_number(nvl, "peerid");
-
- /*
- * Check that userspace isn't giving us a data packet. That might lead
- * to IV re-use, which would be bad.
- */
- if ((pkt[0] >> OVPN_OP_SHIFT) == OVPN_OP_DATA_V2)
- return (EINVAL);
-
- m = m_get2(pktlen, M_WAITOK, MT_DATA, M_PKTHDR);
- if (m == NULL)
- return (ENOMEM);
-
- m->m_len = m->m_pkthdr.len = pktlen;
- m_copyback(m, 0, m->m_len, pkt);
-
- /* Now prepend IP/UDP headers and transmit the mbuf. */
- NET_EPOCH_ENTER(et);
- ret = ovpn_encap(sc, peerid, m);
- NET_EPOCH_EXIT(et);
- if (ret == 0)
- OVPN_COUNTER_ADD(sc, sent_ctrl_pkts, 1);
- else
- OVPN_COUNTER_ADD(sc, lost_ctrl_pkts_out, 1);
-
- return (ret);
-}
-
static void
ovpn_send_ping(void *arg)
{
@@ -1170,9 +1121,6 @@
case OVPN_DEL_KEY:
ret = ovpn_del_key(ifp, nvl);
break;
- case OVPN_SEND_PKT:
- ret = ovpn_send_pkt(ifp, nvl);
- break;
case OVPN_SET_PEER:
ret = ovpn_set_peer(ifp, nvl);
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 13, 12:35 PM (16 m, 50 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36632770
Default Alt Text
D37602.id114124.diff (1 KB)
Attached To
Mode
D37602: if_ovpn: remove OVPN_SEND_PKT
Attached
Detach File
Event Timeline
Log In to Comment