dev.archive.openwrt.org Open in urlscan Pro
2a01:4f8:210:5087::2  Public Scan

Submitted URL: https://dev.openwrt.org/ticket/4108
Effective URL: https://dev.archive.openwrt.org/ticket/4108
Submission: On May 05 via api from US — Scanned from DE

Form analysis 16 forms found in the DOM

GET

<form id="search" action="" method="get">
  <div>
    <label for="proj-search">Search:</label>
    <input type="text" id="proj-search" name="q" size="18" value="">
    <input type="submit" value="Search">
  </div>
</form>

GET 4108.html#comment

<form id="addreply" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="description">
    <input type="submit" name="reply" value="↳ Reply" title="Reply, quoting this description">
  </div>
</form>

GET

<form method="get" action="" id="attachfile">
  <div>
    <input type="hidden" name="action" value="new">
    <input type="submit" name="attachfilebutton" value="Attach file">
  </div>
</form>

GET

<form id="prefs" method="get" action="" style="position: absolute; right: 0">
  <div id="trac-comments-order">
    <input type="radio" id="trac-comments-oldest" name="trac-comments-order" value="oldest" checked="checked">
    <label for="trac-comments-oldest">Oldest first</label>
    <input type="radio" id="trac-comments-newest" name="trac-comments-order" value="newest">
    <label for="trac-comments-newest">Newest first</label>
    <span id="trac-threaded-toggle" style="">
      <input type="radio" id="trac-comments-threaded" name="trac-comments-order" value="threaded">
      <label for="trac-comments-threaded">Threaded</label>
    </span>
  </div>
  <div>
    <input id="trac-comments-only-toggle" type="checkbox">
    <label for="trac-comments-only-toggle">Comments only</label>
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-1" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="1">
    <input type="submit" value="↳ Reply" title="Reply to comment 1">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-2" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="2">
    <input type="submit" value="↳ Reply" title="Reply to comment 2">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-3" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="3">
    <input type="submit" value="↳ Reply" title="Reply to comment 3">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-4" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="4">
    <input type="submit" value="↳ Reply" title="Reply to comment 4">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-5" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="5">
    <input type="submit" value="↳ Reply" title="Reply to comment 5">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-6" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="6">
    <input type="submit" value="↳ Reply" title="Reply to comment 6">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-7" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="7">
    <input type="submit" value="↳ Reply" title="Reply to comment 7">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-8" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="8">
    <input type="submit" value="↳ Reply" title="Reply to comment 8">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-9" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="9">
    <input type="submit" value="↳ Reply" title="Reply to comment 9">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-10" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="10">
    <input type="submit" value="↳ Reply" title="Reply to comment 10">
  </div>
</form>

GET 4108.html#comment

<form id="reply-to-comment-11" method="get" action="4108.html#comment">
  <div class="inlinebuttons">
    <input type="hidden" name="replyto" value="11">
    <input type="submit" value="↳ Reply" title="Reply to comment 11">
  </div>
</form>

POST 4108.html#trac-add-comment

<form method="post" id="propertyform" action="4108.html#trac-add-comment">
  <div><input type="hidden" name="__FORM_TOKEN" value=""></div>
  <div id="trac-add-comment" class="field">
    <h3 class="foldable" id="edit"><a id="no3" href="#no3">Add Comment</a></h3>
    <div>
      <div id="trac-edit-warning" class="warning system-message" style="display: none">This ticket has been modified since you started editing. You should review the <em class="trac-new">other modifications</em> which have been appended above, and
        any <em class="trac-conflict">conflicts</em> shown in the preview below. You can nevertheless proceed and submit your changes if you wish so.</div>
      <fieldset>
        <label for="comment">You may use <a tabindex="42" href="/wiki/WikiFormatting.html">WikiFormatting</a> here.</label>
        <div class="wikitoolbar">
          <a href="#" id="strong" title="Bold text: '''Example'''" tabindex="400"></a><a href="#" id="em" title="Italic text: ''Example''" tabindex="400"></a><a href="#" id="heading" title="Heading: == Example ==" tabindex="400"></a><a href="#" id="link" title="Link: [http://www.example.com/ Example]" tabindex="400"></a><a href="#" id="code" title="Code block: {{{ example }}}" tabindex="400"></a><a href="#" id="hr" title="Horizontal rule: ----" tabindex="400"></a><a href="#" id="np" title="New paragraph" tabindex="400"></a><a href="#" id="br" title="Line break: [[BR]]" tabindex="400"></a><a href="#" id="img" title="Image: [[Image()]]" tabindex="400"></a>
        </div>
        <div class="trac-resizable">
          <div><textarea id="comment" name="comment" class="wikitext trac-resizable" rows="10" cols="78"></textarea>
            <div class="trac-grip" style="margin-left: -1px; margin-right: -1px;"></div>
          </div>
        </div>
      </fieldset>
    </div>
  </div>
  <div class="">
    <h3 class="foldable"><a id="no4" href="#no4">Modify Ticket</a></h3>
    <div id="modify">
      <fieldset id="action">
        <legend>Action</legend>
        <div>
          <input type="radio" id="action_leave" name="action" value="leave" checked="checked">
          <label for="action_leave">leave</label> as closed <span class="hint">.</span>
        </div>
        <div>
          <input type="radio" id="action_reopen" name="action" value="reopen">
          <label for="action_reopen">reopen</label>
          <span class="hint">The resolution will be deleted. Next status will be 'reopened'.</span>
        </div>
      </fieldset>
    </div>
  </div>
  <div id="ticketchange" class="ticketdraft" style="display: none">
    <h3 class="change">
      <span class="threading">
      </span> Changed by anonymous <span class="trac-loading"></span>
    </h3>
    <div class="trac-ticket-buttons">
    </div>
  </div>
  <div class="field">
    <fieldset>
      <legend>Author</legend>
      <table>
        <tbody>
          <tr>
            <th>
              <label for="author">Your email or username:</label><br>
            </th>
            <td>
              <input type="text" id="author" name="author" size="40" value="anonymous">
              <br>
            </td>
          </tr>
        </tbody>
      </table>
      <p class="hint"> E-mail address and user name can be saved in the <a href="#">Preferences</a>. </p>
    </fieldset>
  </div>
  <div class="trac-nav">
    <a href="4108.html#attachments" id="trac-up-attachments" title="Go to the list of attachments">Attachments</a> ↑ <a href="4108.html#content" id="trac-up-view" title="View the ticket description">Description</a> ↑
  </div>
  <div style="display:none;"><input type="text" name="mail_addr" value=""><input type="hidden" name="mail_addr_confirm" value=""></div>
  <div class="buttons">
    <input type="hidden" name="start_time" value="1462744427199169">
    <input type="hidden" name="view_time" value="1462744427199169">
    <input type="hidden" name="replyto">
    <input type="submit" name="preview" value="Preview">&nbsp; <input type="submit" name="submit" value="Submit changes">
  </div>
</form>

Text Content

This are archived contents of the former dev.openwrt.org development system. The
pages are provided for historical reference only. Refer to https://openwrt.org/
for up-to-date information.

Search:
 * Login
 * Preferences
 * Help/Guide
 * About Trac
 * Register

 * Wiki
 * Timeline
 * Roadmap
 * Browse Source
 * View Tickets
 * New Ticket
 * Search


CONTEXT NAVIGATION

 * ← Previous Ticket
 * Next Ticket →

--------------------------------------------------------------------------------

Modify ↓

Opened 9 years ago

Closed 8 years ago

Last modified 21 months ago


#4108 CLOSED DEFECT (FIXED)


UDHCPC IGNORES RENEW REPLIES FROM DHCP SERVER

Reported by: openwrt@… Owned by: developers Priority: normal Milestone:
Component: base system Version: Keywords: udhcpc renew connection drop Cc:


DESCRIPTION ¶



I'm suspecting a bug in udhcpc. It just can't renew a dhcp lease. When the lease
time is sufficiently big, you wouldn't easily notice, however mine is 15
minutes.


The result is that every 15 minutes (dhcp lease time) all my connections drop.
When the lease expires, udhcpc notices, and instead of trying to renew, just
requests a new lease, which works.


# udhcpc -f -t 0 -i eth0.1 -b -p /var/run/eth0.1.pid
udhcpc (v1.4.2) started
Sending discover...
Sending select for 10.0.65.172...
Lease of 10.0.65.172 obtained, lease time 900
adding router 10.0.65.254
deleting old routes
adding dns 134.58.126.3
adding dns 134.58.127.1


[ I did a kill -SIGUSR1 to force renew ]


Performing a DHCP renew
Sending renew...
Sending renew...
Sending renew...
[and keeps on repeating...]


In the mean while I'm running tcpdump:


# tcpdump -n -e -v -i eth0.1 port 68 or port 67
tcpdump: listening on eth0.1, link-type EN10MB (Ethernet), capture size 96 bytes


[ Here udhcpc will do it's initial dhcp request ]


00:32:46.683964 00:12:17:b7:86:a3 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800),
length 319: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto: UDP (17),
length: 305) 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
00:12:17:b7:86:a3, length: 277, xid:0xcdc8ff73, flags: [none]


> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:32:46.701838 00:0f:1f:6f:ea:f5 > 00:12:17:b7:86:a3, ethertype IPv4 (0x0800),
length 349: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: UDP (17),
length: 335) 10.0.65.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length:
307, hops:2, xid:0xcdc8ff73, flags: [none]


> Your IP: 10.0.65.172
> Server IP: 134.58.127.4
> Gateway IP: 10.0.65.254
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:32:46.703592 00:12:17:b7:86:a3 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800),
length 331: (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto: UDP (17),
length: 317) 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
00:12:17:b7:86:a3, length: 289, xid:0xcdc8ff73, flags: [none]


> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:32:46.726308 00:0f:1f:6f:ea:f5 > 00:12:17:b7:86:a3, ethertype IPv4 (0x0800),
length 349: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: UDP (17),
length: 335) 10.0.65.254.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length:
307, hops:2, xid:0xcdc8ff73, flags: [none]


> Your IP: 10.0.65.172
> Server IP: 134.58.127.4
> Gateway IP: 10.0.65.254
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

[ It received it's IP, time passes, now I forced it to renew ]


00:33:27.389614 00:12:17:b7:86:a3 > 00:0f:1f:6f:ea:f5, ethertype IPv4 (0x0800),
length 319: (tos 0x0, ttl 64, id 4130, offset 0, flags [DF], proto: UDP (17),
length: 305) 10.0.65.172.68 > 134.58.127.4.67: BOOTP/DHCP, Request from
00:12:17:b7:86:a3, length: 277, xid:0xcdc8ff73, flags: [none]


> Client IP: 10.0.65.172
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:33:27.408126 00:0f:1f:6f:ea:f5 > 00:12:17:b7:86:a3, ethertype IPv4 (0x0800),
length 349: (tos 0x0, ttl 59, id 0, offset 0, flags [DF], proto: UDP (17),
length: 335) 134.58.127.1.67 > 10.0.65.172.68: BOOTP/DHCP, Reply, length: 307,
xid:0xcdc8ff73, flags: [none]


> Client IP: 10.0.65.172
> Your IP: 10.0.65.172
> Server IP: 134.58.127.4
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:33:29.390964 00:12:17:b7:86:a3 > 00:0f:1f:6f:ea:f5, ethertype IPv4 (0x0800),
length 319: (tos 0x0, ttl 64, id 4331, offset 0, flags [DF], proto: UDP (17),
length: 305) 10.0.65.172.68 > 134.58.127.4.67: BOOTP/DHCP, Request from
00:12:17:b7:86:a3, length: 277, xid:0xcdc8ff73, flags: [none]


> Client IP: 10.0.65.172
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:33:29.399099 00:0f:1f:6f:ea:f5 > 00:12:17:b7:86:a3, ethertype IPv4 (0x0800),
length 349: (tos 0x0, ttl 59, id 0, offset 0, flags [DF], proto: UDP (17),
length: 335) 134.58.127.1.67 > 10.0.65.172.68: BOOTP/DHCP, Reply, length: 307,
xid:0xcdc8ff73, flags: [none]


> Client IP: 10.0.65.172
> Your IP: 10.0.65.172
> Server IP: 134.58.127.4
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:33:31.390964 00:12:17:b7:86:a3 > 00:0f:1f:6f:ea:f5, ethertype IPv4 (0x0800),
length 319: (tos 0x0, ttl 64, id 4531, offset 0, flags [DF], proto: UDP (17),
length: 305) 10.0.65.172.68 > 134.58.127.4.67: BOOTP/DHCP, Request from
00:12:17:b7:86:a3, length: 277, xid:0xcdc8ff73, flags: [none]


> Client IP: 10.0.65.172
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

00:33:31.399663 00:0f:1f:6f:ea:f5 > 00:12:17:b7:86:a3, ethertype IPv4 (0x0800),
length 349: (tos 0x0, ttl 59, id 0, offset 0, flags [DF], proto: UDP (17),
length: 335) 134.58.127.1.67 > 10.0.65.172.68: BOOTP/DHCP, Reply, length: 307,
xid:0xcdc8ff73, flags: [none]


> Client IP: 10.0.65.172
> Your IP: 10.0.65.172
> Server IP: 134.58.127.4
> Client Ethernet Address: 00:12:17:b7:86:a3 [|bootp]

[ and keeps on repeating... ]



ATTACHMENTS (0)


Oldest first Newest first Threaded
Comments only


CHANGE HISTORY (11)


COMMENT:1 IN REPLY TO: ↑ DESCRIPTION CHANGED 9 YEARS AGO BY ZARDAM@…



This bug is still present in 8.09_RC1. I've got exactly the same problem. It
seems that default firewall rules are blocking the dhcp server renewal response
packets. (and so this is not an udhcpc problem)



COMMENT:2 CHANGED 9 YEARS AGO BY JPA@…



As zardam said, the problem is apparently in the firewall rules. Adding
following to /etc/firewall.user seems to fix the problem:
iptables -A input_wan -p udp --dport 68 -j ACCEPT


It seems like the default firewall rules do not detect REQUEST responses as
"related", but let DISCOVER responses through for some reason.



COMMENT:3 CHANGED 9 YEARS AGO BY AGRIFFIS@…



Wow, this one's been killing me for months. Every 16 hours I see:


Jun 1 11:41:54 wrt2 root: removing wan (eth1) from firewall zone wan
Jun 1 11:41:56 wrt2 root: adding wan (eth1) to firewall zone wan


which is the result of this bug. Seems like any interface which is configured to
use DHCP needs to have this rule applied, the most obvious being the wan
interface.



COMMENT:4 CHANGED 9 YEARS AGO BY RETRACILE <RETRACILE@…>



It looks like #4781 is related.



COMMENT:5 CHANGED 9 YEARS AGO BY RETRACILE <RETRACILE@…>



This iptables change worked for me.



COMMENT:6 CHANGED 9 YEARS AGO BY ANONYMOUS



Please add this fix to the newest relase.
That will help many people.



COMMENT:7 CHANGED 8 YEARS AGO BY ANONYMOUS



Just to confirm, the addition to firewall.user worked for me as well. Thanks.



COMMENT:8 CHANGED 8 YEARS AGO BY JOW


 * Resolution set to fixed
 * Status changed from new to closed

see r17238



COMMENT:9 CHANGED 3 YEARS AGO BY ANONYMOUS



DHCP request (renewal) is sent to 134.58.127.4 but the DHCP reply comes from a
different IP address (134.58.127.1). That's why it's not related and you need to
explicitly allow incoming UDP 68. Are you sure that's not some weird DHCP
server/relay misconfiguration? I don't think this patch applies in the general
case.



COMMENT:10 FOLLOW-UP: ↓ 11 CHANGED 3 YEARS AGO BY ANONYMOUS



Actually, a DHCP client renewing it's lease will initially try to reach the
server using unicast but will fall back to broadcast if that's not possible.
Definitely some weird network configuration there, probably some relay involved.
So in the latter case you don't have conntrack kicking in and the reply will
have to be explicitly let in using the above ACCEPT rule. So it does make sense
keeping the rule around.



COMMENT:11 IN REPLY TO: ↑ 10 CHANGED 21 MONTHS AGO BY DENSMOKE@…



Replying to anonymous:


> Actually, a DHCP client renewing it's lease will initially try to reach the
> server using unicast but will fall back to broadcast if that's not possible.
> Definitely some weird network configuration there, probably some relay
> involved. So in the latter case you don't have conntrack kicking in and the
> reply will have to be explicitly let in using the above ACCEPT rule. So it
> does make sense keeping the rule around.

In my case udhcpc tries to sent renew to gateway, when dhcp server has another
ip



ADD COMMENT

This ticket has been modified since you started editing. You should review the
other modifications which have been appended above, and any conflicts shown in
the preview below. You can nevertheless proceed and submit your changes if you
wish so.
You may use WikiFormatting here.




MODIFY TICKET

Action
leave as closed .
reopen The resolution will be deleted. Next status will be 'reopened'.


CHANGED BY ANONYMOUS


Author

Your email or username:



E-mail address and user name can be saved in the Preferences.

Attachments ↑ Description ↑

 
Note: See TracTickets for help on using tickets.


DOWNLOAD IN OTHER FORMATS:

 * Comma-delimited Text
 * Tab-delimited Text
 * RSS Feed

--------------------------------------------------------------------------------

Powered by Trac 1.0.1
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.com/