/* See RFC 2516 */
#include <sys/ioctl.h>
-#include <linux/ppp_defs.h>
#include <linux/ppp-ioctl.h>
#include <net/if.h>
#include <netinet/in.h>
#include "socket-util.h"
#include "async.h"
#include "refcnt.h"
-#include "unaligned.h"
#include "utf8.h"
#define PPPOE_MAX_PACKET_SIZE 1484
case PPPOE_STATE_INITIALIZING:
r = pppoe_send_initiation(ppp);
if (r < 0)
- log_warning("PPPoE: sending PADI failed: %s", strerror(-r));
+ log_warning_errno(r, "PPPoE: sending PADI failed: %m");
break;
case PPPOE_STATE_REQUESTING:
r = pppoe_send_initiation(ppp);
if (r < 0)
- log_warning("PPPoE: sending PADI failed: %s", strerror(-r));
+ log_warning_errno(r, "PPPoE: sending PADI failed: %m");
ppp->padr_resend_count = PPPOE_MAX_PADR_RESEND;
ppp->state = PPPOE_STATE_INITIALIZING;
} else {
r = pppoe_send_request(ppp);
if (r < 0)
- log_warning("PPPoE: sending PADR failed: %s", strerror(-r));
+ log_warning_errno(r, "PPPoE: sending PADR failed: %m");
}
break;
len = recvfrom(fd, packet, buflen, 0, &link.sa, &addrlen);
if (len < 0) {
- log_warning("PPPoE: could not receive message from raw socket: %s", strerror(-r));
+ log_warning_errno(r, "PPPoE: could not receive message from raw socket: %m");
return 0;
} else if ((size_t)len < sizeof(struct pppoe_hdr))
return 0;