summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pppoe
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/pppoe')
-rw-r--r--accel-pppd/ctrl/pppoe/disc.c2
-rw-r--r--accel-pppd/ctrl/pppoe/mac_filter.c6
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c5
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.h4
4 files changed, 9 insertions, 8 deletions
diff --git a/accel-pppd/ctrl/pppoe/disc.c b/accel-pppd/ctrl/pppoe/disc.c
index b1119eb1..8a82e1d2 100644
--- a/accel-pppd/ctrl/pppoe/disc.c
+++ b/accel-pppd/ctrl/pppoe/disc.c
@@ -202,7 +202,7 @@ void pppoe_disc_stop(struct pppoe_serv_t *serv)
free_net(n);
}
-static int forward(struct disc_net *net, int ifindex, void *pkt, int len)
+static int forward(struct disc_net *net, int ifindex, uint8_t *pkt, int len)
{
struct pppoe_serv_t *n;
struct tree *t = &net->tree[ifindex & HASH_BITS];
diff --git a/accel-pppd/ctrl/pppoe/mac_filter.c b/accel-pppd/ctrl/pppoe/mac_filter.c
index d1e104e6..ba78df6b 100644
--- a/accel-pppd/ctrl/pppoe/mac_filter.c
+++ b/accel-pppd/ctrl/pppoe/mac_filter.c
@@ -52,7 +52,7 @@ static int mac_filter_load(const char *opt)
char *c;
char *name = _strdup(opt);
char *buf = _malloc(1024);
- int n[ETH_ALEN];
+ unsigned int n[ETH_ALEN];
int i, line = 0;
c = strstr(name, ",");
@@ -122,7 +122,7 @@ err:
static void mac_filter_add(const char *addr, void *client)
{
- int n[ETH_ALEN];
+ unsigned int n[ETH_ALEN];
struct mac_t *mac;
int i;
@@ -149,7 +149,7 @@ static void mac_filter_add(const char *addr, void *client)
static void mac_filter_del(const char *addr, void *client)
{
- int n[ETH_ALEN];
+ unsigned int n[ETH_ALEN];
uint8_t a[ETH_ALEN];
struct mac_t *mac;
int i;
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index 6d876495..18aac8bd 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.c
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -46,7 +46,7 @@ struct pppoe_conn_t {
struct pppoe_serv_t *serv;
uint16_t sid;
uint8_t addr[ETH_ALEN];
- int ppp_started:1;
+ unsigned int ppp_started:1;
struct pppoe_tag *relay_sid;
struct pppoe_tag *host_uniq;
@@ -735,7 +735,8 @@ static int add_tag(uint8_t *pack, size_t pack_size, int type, const void *data,
tag->tag_type = htons(type);
tag->tag_len = htons(len);
- memcpy(tag->tag_data, data, len);
+ if (data && len)
+ memcpy(tag->tag_data, data, len);
hdr->length = htons(ntohs(hdr->length) + sizeof(*tag) + len);
return 0;
diff --git a/accel-pppd/ctrl/pppoe/pppoe.h b/accel-pppd/ctrl/pppoe/pppoe.h
index 1ea7b07d..7ba4ac63 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.h
+++ b/accel-pppd/ctrl/pppoe/pppoe.h
@@ -97,8 +97,8 @@ struct pppoe_serv_t
int padi_limit;
time_t last_padi_limit_warn;
- int stopping:1;
- int vlan_mon:1;
+ unsigned int stopping:1;
+ unsigned int vlan_mon:1;
};
extern int conf_verbose;