Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to Main 0.9.13 #295

Merged
merged 4 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion code/bngblaster/src/bbl_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,10 @@ bbl_interface_ctrl(int fd, uint32_t session_id __attribute__((unused)), json_t *
io = io->next;
}

jobj = json_pack("{ss si ss* ss* si sI sI sI sI }",
jobj = json_pack("{ss si si ss* ss* si sI sI sI sI }",
"name", interface->name,
"ifindex", interface->ifindex,
"ifindex-kernel", interface->kernel_index,
"type", interface_type_string(interface->type),
"state", interface_state_string(interface->state),
"state-transitions", interface->state_transitions,
Expand Down
5 changes: 5 additions & 0 deletions code/bngblaster/src/bbl_l2tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,11 @@ bbl_l2tp_handler_rx(bbl_network_interface_s *interface,
l2tp_key_t key = {0};
void **search = NULL;

if(!g_ctx->config.l2tp_server) {
/* No L2TP server configuration found! */
return;
}

if(l2tp->type == L2TP_MESSAGE_SCCRQ) {
bbl_l2tp_sccrq_rx(interface, eth, l2tp);
return;
Expand Down
9 changes: 8 additions & 1 deletion code/bngblaster/src/bbl_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,14 @@ bbl_stream_io_send_iter(io_handle_s *io, uint64_t now)
}
stream = stream->io_next;
}
if(!stream) io_bucket->stream_cur = NULL;
if(!stream) {
if(io_bucket->stream_cur == io_bucket->stream_head) {
/* We can reset bucket base if none of the streams
* in the bucket is active. */
io_bucket->base = 0;
}
io_bucket->stream_cur = NULL;
}
/* next bucket */
io_bucket = io_bucket->next;
if(!io_bucket) io_bucket = io->bucket_head;
Expand Down
10 changes: 7 additions & 3 deletions code/bngblaster/src/bbl_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,14 @@ bbl_tx_encode_packet_dhcp(bbl_session_s *session)
session->dhcp_request_timestamp.tv_sec = now.tv_sec;
}

/* Option 82 ... */
/* TR-101 R-124:
* The Access Node, when performing the function of a
* Layer 2 DHCP Relay Agent (this is what we emulate here),
* MUST add option-82 with the „circuit-id’ and/or ‘remote-id’
* sub-options to all DHCP messages sent by the client before
* forwarding to the BNG. */
if(g_ctx->config.dhcp_access_line &&
(session->agent_circuit_id || session->agent_remote_id) &&
session->dhcp_state != BBL_DHCP_RELEASE) {
(session->agent_circuit_id || session->agent_remote_id)) {
access_line.aci = session->agent_circuit_id;
access_line.ari = session->agent_remote_id;
access_line.aaci = session->access_aggregation_circuit_id;
Expand Down
2 changes: 1 addition & 1 deletion code/bngblaster/src/io/io_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ io_thread_init(io_handle_s *io)

io->thread = thread;
thread->io = io;
io->fanout_id = interface->ifindex+1;
io->fanout_id = interface->kernel_index;
io->fanout_type = PACKET_FANOUT_HASH;

/* Allocate thread scratchpad memory */
Expand Down
Loading