System

linux kernel 2.6.22 & geoip 패치

EcusE 2007. 7. 22. 22:49

출처 : http://lists.netfilter.org/pipermail/netfilter-devel/2007-July/028630.html

linux kernel 2.6.22에 geoip 사용을 위해 patch-o-matic-ng로 커널에 geoip패치를 한후
커널 컴파일을 하면 다음과 같은 에러가 날 수 있습니다.


 
  1. ....... 생략
  2.  
  3. CC [M] net/ipv4/netfilter/ipt_geoip.o
  4. net/ipv4/netfilter/ipt_geoip.c: In function `match':
  5. net/ipv4/netfilter/ipt_geoip.c:113: error: structure has no member named `nh'
  6. net/ipv4/netfilter/ipt_geoip.c: In function `init':
  7. net/ipv4/netfilter/ipt_geoip.c:291: warning: implicit declaration of function `ipt_register_match'
  8. net/ipv4/netfilter/ipt_geoip.c: In function `fini':
  9. net/ipv4/netfilter/ipt_geoip.c:296: warning: implicit declaration of function `ipt_unregister_match'
  10. make[3]: *** [net/ipv4/netfilter/ipt_geoip.o] Error 1
  11. make[2]: *** [net/ipv4/netfilter] Error 2
  12. make[1]: *** [net/ipv4] Error 2
  13. make: *** [net] Error 2


해결방법은 geoip.c 소스를 직접 수정하면 에러없이 정상적으로 커널을 컴파일 할수 있습니다.
또는 아래링크의 패치파일로 패치를 할수 있습니다.

http://bjerkeset.com/patches/geoip-match-2.6.22.patch.gz