Thread (90 messages) 90 messages, 8 authors, 2024-04-02

Re: [PATCH net-next v2 06/22] ovpn: introduce the ovpn_peer object

From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-03-04 21:52:24

On Mon, Mar 04, 2024 at 04:08:57PM +0100, Antonio Quartulli wrote:
An ovpn_peer object holds the whole status of a remote peer
(regardless whether it is a server or a client).

This includes status for crypto, tx/rx buffers, napi, etc.

Only support for one peer is introduced (P2P mode).
Multi peer support is introduced with a later patch.

Along with the ovpn_peer, also the ovpn_bind object is introcued
introduced

 > +/* Translate skb->protocol value to AF_INET or AF_INET6 */
+static inline unsigned short skb_protocol_to_family(const struct sk_buff *skb)
+{
+	switch (skb->protocol) {
+	case htons(ETH_P_IP):
+		return AF_INET;
+	case htons(ETH_P_IPV6):
+		return AF_INET6;
+	default:
+		return 0;
That feels like the sort of thing which should already exist
somewhere. But a quick search did not find it...

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help