Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a664821 authored by Patrick McHardy's avatar Patrick McHardy Committed by Pablo Neira Ayuso
Browse files

netfilter: nf_nat: support IPv6 in SIP NAT helper



Add IPv6 support to the SIP NAT helper. There are no functional differences
to IPv4 NAT, just different formats for addresses.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent ee6eb966
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -99,10 +99,8 @@ enum sip_header_types {
enum sdp_header_types {
	SDP_HDR_UNSPEC,
	SDP_HDR_VERSION,
	SDP_HDR_OWNER_IP4,
	SDP_HDR_CONNECTION_IP4,
	SDP_HDR_OWNER_IP6,
	SDP_HDR_CONNECTION_IP6,
	SDP_HDR_OWNER,
	SDP_HDR_CONNECTION,
	SDP_HDR_MEDIA,
};

@@ -111,7 +109,8 @@ extern unsigned int (*nf_nat_sip_hook)(struct sk_buff *skb,
				       unsigned int dataoff,
				       const char **dptr,
				       unsigned int *datalen);
extern void (*nf_nat_sip_seq_adjust_hook)(struct sk_buff *skb, s16 off);
extern void (*nf_nat_sip_seq_adjust_hook)(struct sk_buff *skb,
					  unsigned int protoff, s16 off);
extern unsigned int (*nf_nat_sip_expect_hook)(struct sk_buff *skb,
					      unsigned int protoff,
					      unsigned int dataoff,
+0 −5
Original line number Diff line number Diff line
@@ -242,11 +242,6 @@ config NF_NAT_H323
	depends on NF_CONNTRACK && NF_NAT_IPV4
	default NF_NAT_IPV4 && NF_CONNTRACK_H323

config NF_NAT_SIP
	tristate
	depends on NF_CONNTRACK && NF_NAT_IPV4
	default NF_NAT_IPV4 && NF_CONNTRACK_SIP

# mangle + specific targets
config IP_NF_MANGLE
	tristate "Packet mangling"
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ obj-$(CONFIG_NF_DEFRAG_IPV4) += nf_defrag_ipv4.o
obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o
obj-$(CONFIG_NF_NAT_IRC) += nf_nat_irc.o
obj-$(CONFIG_NF_NAT_PPTP) += nf_nat_pptp.o
obj-$(CONFIG_NF_NAT_SIP) += nf_nat_sip.o
obj-$(CONFIG_NF_NAT_SNMP_BASIC) += nf_nat_snmp_basic.o
obj-$(CONFIG_NF_NAT_TFTP) += nf_nat_tftp.o

+5 −0
Original line number Diff line number Diff line
@@ -390,6 +390,11 @@ config NF_NAT_FTP
	depends on NF_CONNTRACK && NF_NAT
	default NF_NAT && NF_CONNTRACK_FTP

config NF_NAT_SIP
	tristate
	depends on NF_CONNTRACK && NF_NAT
	default NF_NAT && NF_CONNTRACK_SIP

endif # NF_CONNTRACK

# transparent proxy support
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ obj-$(CONFIG_NF_NAT_PROTO_SCTP) += nf_nat_proto_sctp.o
# NAT helpers
obj-$(CONFIG_NF_NAT_AMANDA) += nf_nat_amanda.o
obj-$(CONFIG_NF_NAT_FTP) += nf_nat_ftp.o
obj-$(CONFIG_NF_NAT_SIP) += nf_nat_sip.o

# transparent proxy support
obj-$(CONFIG_NETFILTER_TPROXY) += nf_tproxy_core.o
Loading