OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 17.1 Legacy Series »
  • Loss of internet access and OPNSense reachability
« previous next »
  • Print
Pages: 1 [2]

Author Topic: Loss of internet access and OPNSense reachability  (Read 73675 times)

Mr.Goodcat

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 7
    • View Profile
Re: Loss of internet access and OPNSense reachability
« Reply #15 on: March 12, 2017, 09:44:17 pm »
OK, fixed it.

As written a few posts ago I made some changes in the dhclient.c file:
https://github.com/opnsense/src/blob/master/sbin/dhclient/dhclient.c

Here is the function which contains my change to actually make the "supersede dhcp-server-identifier 255.255.255.255" line work:

Code: [Select]
void
state_bound(void *ipp)
{
struct interface_info *ip = ipp;

ASSERT_STATE(state, S_BOUND);

/* T1 has expired. */
make_request(ip, ip->client->active);
ip->client->xid = ip->client->packet.xid;

/* Start of the updated section. */


if (ip->client->config->default_actions[DHO_DHCP_SERVER_IDENTIFIER] == ACTION_SUPERSEDE) {
memcpy(ip->client->destination.iabuf, ip->client->config->defaults[DHO_DHCP_SERVER_IDENTIFIER].data, 4);
ip->client->config->defaults[DHO_DHCP_SERVER_IDENTIFIER].len = 4;
} else if (ip->client->active->options[DHO_DHCP_SERVER_IDENTIFIER].len == 4) {
memcpy(ip->client->destination.iabuf, ip->client->active->
    options[DHO_DHCP_SERVER_IDENTIFIER].data, 4);
ip->client->destination.len = 4;
} else
ip->client->destination = iaddr_broadcast;


/* End of the updated section */


ip->client->first_sending = cur_time;
ip->client->interval = ip->client->config->initial_interval;
ip->client->state = S_RENEWING;

/* Send the first packet immediately. */
send_request(ip);
}

After compiling dhclient from your git under FreeBSD the option works and dhclient sends renew requests via broadcast as it should. This finally gets the DHCP behind the relay to update the lease ahead of expiry.

@Franco or any other OPN dev: can you please verify this and include it in the next point release? Or even better, submit it to upstream? Thanks!


Now the remaining question is why the connection between WAN and the LAN bridge is lost if the WAN lease expires. If that could also get fixed I'd at last be able to deploy OPN more widely.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13988
  • Karma: 1211
    • View Profile
Re: Loss of internet access and OPNSense reachability
« Reply #16 on: March 24, 2017, 08:26:43 am »
Hi Fabian,

Working on this now... Is this your patch or was this derived from e.g. OpenBSD's version?

Is there anything else we need to do here or will patching dhclient suffice to fix the use case?


Thanks,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13988
  • Karma: 1211
    • View Profile
Re: Loss of internet access and OPNSense reachability
« Reply #17 on: March 24, 2017, 08:29:26 am »
And how relevant is the MTU addition here?

https://github.com/opnsense/src/commit/4af258db


Cheers,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13988
  • Karma: 1211
    • View Profile
Re: Loss of internet access and OPNSense reachability
« Reply #18 on: March 25, 2017, 08:10:49 am »
Ok, the MTU parts didn't build and I have aligned the code to this in order to allow the sanity check to be executed in both cases, which matches a similar block found in priv_script_write_params():

https://github.com/opnsense/src/commit/702ff9b912

If you could test this and let me know it works we can merge this. :)


Cheers,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13988
  • Karma: 1211
    • View Profile
Re: Loss of internet access and OPNSense reachability
« Reply #19 on: March 25, 2017, 08:51:17 am »
Me again, so this atomic patch would be it: https://github.com/opnsense/src/commit/d5cb0e5.patch
Logged

opnsense_user12123

  • Guest
Re: Loss of internet access and OPNSense reachability
« Reply #20 on: January 27, 2018, 11:21:20 am »
Im using a cable Modem too. In the current version 17.7.12 this problem still exisits.
I have no problems connecting to opnsense or getting internet connection, but after every wan dhcp renew i get broken pipe rdrtool waiting messages in gateway log. These messages disappear only if i hit the save button on reporting settings rdrtool and appear again after dhcp renew on wan interface. Reinstall rdrtool or disable rdrtool doesnt fix the problem.
Will this be fixed in the new Version (18.1) ?

Thx
« Last Edit: January 27, 2018, 10:00:15 pm by opnsense_user12123 »
Logged

Mr.Goodcat

  • Jr. Member
  • **
  • Posts: 94
  • Karma: 7
    • View Profile
Re: Loss of internet access and OPNSense reachability
« Reply #21 on: February 03, 2018, 12:31:40 pm »
Quote from: franco on March 25, 2017, 08:51:17 am
Me again, so this atomic patch would be it: https://github.com/opnsense/src/commit/d5cb0e5.patch

Didn't track the development of OPN for a while, sorry. Version 18.1 is running fine and renews the WAN IP as it should, thanks to the patch (supersede dhcp-server-identifier 255.255.255.255). Thank you!
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13988
  • Karma: 1211
    • View Profile
Re: Loss of internet access and OPNSense reachability
« Reply #22 on: February 03, 2018, 03:35:33 pm »
Hey Mr.Goodcat,

We've been carrying your proposal for a while now without issues. FreeBSD has not yet reacted to our upstream offer.

In any case: thanks for the feedback!  :)


Cheers,
Franco
Logged

  • Print
Pages: 1 [2]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 17.1 Legacy Series »
  • Loss of internet access and OPNSense reachability
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2