[완료] 리눅스 컴파일 방법 및 모듈 설치방법문의드립니다.

taehun의 이미지

IGMP V3가 V2로 강제 변경되는 문제 때문에 고민중 외국인이 같은 문제로 올린글을 보고
(http://www.gossamer-threads.com/lists/linux/kernel/1273443)

/root/kernel/linux-3.0.4/net/ipv4/igmp.c

의 파일을 외국인이 하라는 대로 아래와 같이 고쳤습니다.

if (len == 8) { ===> if (len == 8 || IGMP_V2_SEEN(in_dev)) {

근데 제가 리눅스 초보라서 그 다음에 어떻게 해야하는 지를 모르겠습니다.

어떻게 컴파일을 하고 어떻게 커널 모듈에 심는지를 모르겠습니다.

cpp를 실행하면 다음과 같은 에러가 발생하고

[root@realneuron ipv4]# cpp igmp.c
# 1 "igmp.c"
# 1 ""
# 1 ""
# 1 "igmp.c"
igmp.c:73:26: fatal error: linux/module.h: No such file or directory
compilation terminated.
f (len == 8 || IGMP_V2_SEEN(in_dev))[root@realneuron ipv4]#

gcc를 실행하면 다음과 같은 에러가 발생합니다. ㅡ.ㅡ

[root@realneuron ipv4]# gcc igmp.c
igmp.c:1:8: error: expected ????before ??=??token
igmp.c:73:26: fatal error: linux/module.h: No such file or directory
compilation terminated.

도와주시면 감사하겠습니다.

speedhunter의 이미지

/usr/src/linux 디렉토리에서 make net/ipv4; make net/ipv4/igmp.ko;

커널에 포함되어 있다면.. make bzImage;

wariua의 이미지

같은 문제인 걸까요?

링크의 내용은 "force_igmp_version을 2로 설정해뒀을 때 IGMPv3 query를 받으면 IGMPv2 report로 응답해야 하는데 IGMPv3 report로 응답하는 문제"를 다루고 있습니다. 반면 쓰신 글( http://kldp.org/node/126186#comment-571062 )을 보자면 "force_igmp_version을 3으로 설정해도 값이 계속 2로 남아있는 문제"를 해결하려고 하시는 것 같은데... 다른 종류의 문제 같습니다.

$PWD `date`

taehun의 이미지

답변감사드립니다.

아직 까지 문제가 해결되지 않아서 외국싸이트에 글을 보고 이멜을보냈더니 오늘답변이 왔네요.
저와는 반대의 문제 해결책이라고요...
하드웨어도 바꿔보고 센트os 페도라14 다 설치해봐도 안되네요. ...IGMP문제가 아닌가 싶기도 하고요...
난애한 상황입니다.

항상 답변주셔서 감사합니다~
추운 날씨 감기 조심하시고요!

taehun의 이미지

외국인이 답변을 주었는데 바로 해결되었습니다 ㅎㅎ

rp_filter문제였습니다. ㅋㅋ

Hi,

It could be a kernel setting. Check the kernel settings for rp_filter:
cd /proc/sys/net/ipv4/conf
for d in * ; do
echo $d : `cat $d/rp_filter`
done

If rp_filter = 1 on an interface, the kernel will drop packets if it
can't verify the source address (the "reverse path" or "rp").
If the value is 1, change it to 0:
echo 1 > /proc/sys/net/ipv4/conf/eth1/rp_filter
( for eth1 )

This filter is meant to reject traffic from unknown hosts, and is
on by default in new Linux distros. Note that "all" has the effect
of over-riding all interface settings, and default sets a default
that is inherited by interfaces as they are created. So
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
will force rp_filter off for all interfaces. If the value is 1 for "all"
but 0 for the specific interface, the result is still 1.

Also, examine your iptables and selinux settings. But I know
very little about those - you're better off checking the open
documentation.

Good luck.

-Bob

wariua의 이미지

reverse path filter 문제였다니, 아주 단순한 네트워크 구성을 쓰시는 건 아닌가보군요. 보여주시는 출력 내용에서 "eth0"이 아니라 "eth1"인 게 눈에 밟히더라니. :-)

숙원 문제 해결하셨네요. 축하드려요~~

$PWD `date`

taehun의 이미지

님 덕분에 많은 것도 배우고 문제 해결 실마리도 얻었습니다.

많은 도움주신거 정말 감사드립니다.~~

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.