iptables 컴파일 에러 도무지 모르겠습니다

raphael4의 이미지

extensions/libipt_REJECT.c In function 'parse';
extenstions/libipt_REJECT.c:116:error: label at end of compound statement

iptables1.2 버전 컴파일 하는데 위와 같이 에러가 나옵니다

make KERNEL_DIR=/home/linux-2.6.30.1

이렇게 make 하고

커널에 iptables 관련 사항 다 넣고 빌드 했습니다

저 에러는 구글링 해도 전혀 정보가 없더군요

조금이나마 힌트라도 부탁드립니다.

pchero의 이미지

설치하시는 환경이 어떻게 되시나요?

iptables-1.2 버전으로 확인을 했습니다.
아마도 gcc 버전 문제로 분석됩니다. gcc에서 예전에는 허용했던 구문 오류가 버전업이 되면서 오류로 잡아내는 현상입니다.

extension/libipt_REJECT.c 파일에서 다음의 내용을 확인했습니다.

89 static int
90 parse(int c, char **argv, int invert, unsigned int *flags,
91 const struct ipt_entry *entry,
92 struct ipt_entry_target **target)
93 {
94 struct ipt_reject_info *reject = (struct ipt_reject_info *)(*target)->data;
95 unsigned int limit = sizeof(reject_table)/sizeof(struct reject_names);
96 unsigned int i;
97
98 switch(c) {
99 case '1':
100 if (check_inverse(optarg, &invert))
101 exit_error(PARAMETER_PROBLEM,
102 "Unexpected `!' after --reject-with");
103 for (i = 0; i < limit; i++) {
104 if ((strncasecmp(reject_table[i].name, optarg, strlen(optarg)) == 0)
105 || (strncasecmp(reject_table[i].alias, optarg, strlen(optarg)) == 0)) {
106 reject->with = reject_table[i].with;
107 return 1;
108 }
109 }
110 /* This due to be dropped late in 2.4 pre-release cycle --RR */
111 if (strncasecmp("echo-reply", optarg, strlen(optarg)) == 0
112 || strncasecmp("echoreply", optarg, strlen(optarg)) == 0)
113 fprintf(stderr, "--reject-with echo-reply no longer"
114 " supported\n");
115 exit_error(PARAMETER_PROBLEM, "unknown reject type `%s'",optarg);
116 default:
117 /* Fall through */
118 }
119 return 0;
120 }

116번째 라인 default: 다음에 바로 } switch 종료 구문이 옵니다.
이는 gcc-3.0 이후부터는 허용되지 않는 구문입니다. 최신의 iptables 를 설치하시거나 gcc-3.0 이전의 버전으로 컴파일하시거나 혹은 116번째 라인 밑에 한줄 추가하셔서 ';' 세미콜론을 넣어주시면 문제가 해결될 것으로 보입니다.

Ref: https://bbs.archlinux.org/viewtopic.php?pid=30177

---------------------------------
제일 왼쪽이 저입니다 :)

raphael4의 이미지

컴파일 정상적으로 됩니다
make install이 안되는 문제가 또 발생했지만...
아무튼 감사합니다.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.