@@ -24,7 +24,7 @@ static DEFINE_SPINLOCK(ebt_log_lock);
2424static int ebt_log_check (const char * tablename , unsigned int hookmask ,
2525 const struct ebt_entry * e , void * data , unsigned int datalen )
2626{
27- struct ebt_log_info * info = ( struct ebt_log_info * ) data ;
27+ struct ebt_log_info * info = data ;
2828
2929 if (datalen != EBT_ALIGN (sizeof (struct ebt_log_info )))
3030 return - EINVAL ;
@@ -50,7 +50,7 @@ struct arppayload
5050 unsigned char ip_dst [4 ];
5151};
5252
53- static void print_MAC (unsigned char * p )
53+ static void print_MAC (const unsigned char * p )
5454{
5555 int i ;
5656
@@ -84,7 +84,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
8484
8585 if ((bitmask & EBT_LOG_IP ) && eth_hdr (skb )-> h_proto ==
8686 htons (ETH_P_IP )){
87- struct iphdr _iph , * ih ;
87+ const struct iphdr * ih ;
88+ struct iphdr _iph ;
8889
8990 ih = skb_header_pointer (skb , 0 , sizeof (_iph ), & _iph );
9091 if (ih == NULL ) {
@@ -99,7 +100,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
99100 ih -> protocol == IPPROTO_UDPLITE ||
100101 ih -> protocol == IPPROTO_SCTP ||
101102 ih -> protocol == IPPROTO_DCCP ) {
102- struct tcpudphdr _ports , * pptr ;
103+ const struct tcpudphdr * pptr ;
104+ struct tcpudphdr _ports ;
103105
104106 pptr = skb_header_pointer (skb , ih -> ihl * 4 ,
105107 sizeof (_ports ), & _ports );
@@ -116,7 +118,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
116118 if ((bitmask & EBT_LOG_ARP ) &&
117119 ((eth_hdr (skb )-> h_proto == htons (ETH_P_ARP )) ||
118120 (eth_hdr (skb )-> h_proto == htons (ETH_P_RARP )))) {
119- struct arphdr _arph , * ah ;
121+ const struct arphdr * ah ;
122+ struct arphdr _arph ;
120123
121124 ah = skb_header_pointer (skb , 0 , sizeof (_arph ), & _arph );
122125 if (ah == NULL ) {
@@ -132,7 +135,8 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
132135 if (ah -> ar_hrd == htons (1 ) &&
133136 ah -> ar_hln == ETH_ALEN &&
134137 ah -> ar_pln == sizeof (__be32 )) {
135- struct arppayload _arpp , * ap ;
138+ const struct arppayload * ap ;
139+ struct arppayload _arpp ;
136140
137141 ap = skb_header_pointer (skb , sizeof (_arph ),
138142 sizeof (_arpp ), & _arpp );
@@ -160,7 +164,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,
160164 const struct net_device * in , const struct net_device * out ,
161165 const void * data , unsigned int datalen )
162166{
163- struct ebt_log_info * info = ( struct ebt_log_info * ) data ;
167+ const struct ebt_log_info * info = data ;
164168 struct nf_loginfo li ;
165169
166170 li .type = NF_LOG_TYPE_LOG ;
0 commit comments