@@ -67,9 +67,9 @@ static inline u32 addr_fold(void *addr)
6767static u32 flow_get_src (const struct sk_buff * skb )
6868{
6969 switch (skb -> protocol ) {
70- case __constant_htons (ETH_P_IP ):
70+ case htons (ETH_P_IP ):
7171 return ntohl (ip_hdr (skb )-> saddr );
72- case __constant_htons (ETH_P_IPV6 ):
72+ case htons (ETH_P_IPV6 ):
7373 return ntohl (ipv6_hdr (skb )-> saddr .s6_addr32 [3 ]);
7474 default :
7575 return addr_fold (skb -> sk );
@@ -79,9 +79,9 @@ static u32 flow_get_src(const struct sk_buff *skb)
7979static u32 flow_get_dst (const struct sk_buff * skb )
8080{
8181 switch (skb -> protocol ) {
82- case __constant_htons (ETH_P_IP ):
82+ case htons (ETH_P_IP ):
8383 return ntohl (ip_hdr (skb )-> daddr );
84- case __constant_htons (ETH_P_IPV6 ):
84+ case htons (ETH_P_IPV6 ):
8585 return ntohl (ipv6_hdr (skb )-> daddr .s6_addr32 [3 ]);
8686 default :
8787 return addr_fold (skb -> dst ) ^ (__force u16 )skb -> protocol ;
@@ -91,9 +91,9 @@ static u32 flow_get_dst(const struct sk_buff *skb)
9191static u32 flow_get_proto (const struct sk_buff * skb )
9292{
9393 switch (skb -> protocol ) {
94- case __constant_htons (ETH_P_IP ):
94+ case htons (ETH_P_IP ):
9595 return ip_hdr (skb )-> protocol ;
96- case __constant_htons (ETH_P_IPV6 ):
96+ case htons (ETH_P_IPV6 ):
9797 return ipv6_hdr (skb )-> nexthdr ;
9898 default :
9999 return 0 ;
@@ -120,15 +120,15 @@ static u32 flow_get_proto_src(const struct sk_buff *skb)
120120 u32 res = 0 ;
121121
122122 switch (skb -> protocol ) {
123- case __constant_htons (ETH_P_IP ): {
123+ case htons (ETH_P_IP ): {
124124 struct iphdr * iph = ip_hdr (skb );
125125
126126 if (!(iph -> frag_off & htons (IP_MF |IP_OFFSET )) &&
127127 has_ports (iph -> protocol ))
128128 res = ntohs (* (__be16 * )((void * )iph + iph -> ihl * 4 ));
129129 break ;
130130 }
131- case __constant_htons (ETH_P_IPV6 ): {
131+ case htons (ETH_P_IPV6 ): {
132132 struct ipv6hdr * iph = ipv6_hdr (skb );
133133
134134 if (has_ports (iph -> nexthdr ))
@@ -147,15 +147,15 @@ static u32 flow_get_proto_dst(const struct sk_buff *skb)
147147 u32 res = 0 ;
148148
149149 switch (skb -> protocol ) {
150- case __constant_htons (ETH_P_IP ): {
150+ case htons (ETH_P_IP ): {
151151 struct iphdr * iph = ip_hdr (skb );
152152
153153 if (!(iph -> frag_off & htons (IP_MF |IP_OFFSET )) &&
154154 has_ports (iph -> protocol ))
155155 res = ntohs (* (__be16 * )((void * )iph + iph -> ihl * 4 + 2 ));
156156 break ;
157157 }
158- case __constant_htons (ETH_P_IPV6 ): {
158+ case htons (ETH_P_IPV6 ): {
159159 struct ipv6hdr * iph = ipv6_hdr (skb );
160160
161161 if (has_ports (iph -> nexthdr ))
@@ -213,9 +213,9 @@ static u32 flow_get_nfct(const struct sk_buff *skb)
213213static u32 flow_get_nfct_src (const struct sk_buff * skb )
214214{
215215 switch (skb -> protocol ) {
216- case __constant_htons (ETH_P_IP ):
216+ case htons (ETH_P_IP ):
217217 return ntohl (CTTUPLE (skb , src .u3 .ip ));
218- case __constant_htons (ETH_P_IPV6 ):
218+ case htons (ETH_P_IPV6 ):
219219 return ntohl (CTTUPLE (skb , src .u3 .ip6 [3 ]));
220220 }
221221fallback :
@@ -225,9 +225,9 @@ static u32 flow_get_nfct_src(const struct sk_buff *skb)
225225static u32 flow_get_nfct_dst (const struct sk_buff * skb )
226226{
227227 switch (skb -> protocol ) {
228- case __constant_htons (ETH_P_IP ):
228+ case htons (ETH_P_IP ):
229229 return ntohl (CTTUPLE (skb , dst .u3 .ip ));
230- case __constant_htons (ETH_P_IPV6 ):
230+ case htons (ETH_P_IPV6 ):
231231 return ntohl (CTTUPLE (skb , dst .u3 .ip6 [3 ]));
232232 }
233233fallback :
0 commit comments