projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix whitespaces errors introduced by commit d2848ce
[l2tpns.git]
/
radius.c
diff --git
a/radius.c
b/radius.c
index
7ad2ec3
..
f9f7263
100644
(file)
--- a/
radius.c
+++ b/
radius.c
@@
-363,6
+363,13
@@
void radiussend(uint16_t r, uint8_t state)
}
}
}
}
+ if (session[s].classlen) {
+ *p = 25; // class
+ p[1] = session[s].classlen + 2;
+ memcpy(p + 2, session[s].class, session[s].classlen);
+ p += p[1];
+ }
+
{
struct param_radius_account acct = { &tunnel[session[s].tunnel], &session[s], &p };
run_plugins(PLUGIN_RADIUS_ACCOUNT, &acct);
{
struct param_radius_account acct = { &tunnel[session[s].tunnel], &session[s], &p };
run_plugins(PLUGIN_RADIUS_ACCOUNT, &acct);
@@
-818,6
+825,15
@@
void processrad(uint8_t *buf, int len, char socket_index)
session[s].ipv6prefixlen = prefixlen;
}
}
session[s].ipv6prefixlen = prefixlen;
}
}
+ else if (*p == 25)
+ {
+ // Class
+ if (p[1] < 3) continue;
+ session[s].classlen = p[1] - 2;
+ if (session[s].classlen > MAXCLASS)
+ session[s].classlen = MAXCLASS;
+ memcpy(session[s].class, p + 2, session[s].classlen);
+ }
}
}
else if (r_code == AccessReject)
}
}
else if (r_code == AccessReject)