Revision 00109fef
Added by Michael Newton over 12 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
630 | 630 |
if ($timeout) { |
631 | 631 |
if (($pruning_time - $cpentry['allow_time']) >= $timeout) { |
632 | 632 |
$timedout = true; |
633 |
$term_cause = 5; // Session-Timeout
|
|
633 |
$term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
|
|
634 | 634 |
} |
635 | 635 |
} |
636 | 636 |
|
... | ... | |
638 | 638 |
if (!$timedout && !empty($cpentry['session_terminate_time'])) { |
639 | 639 |
if ($pruning_time >= $cpentry['session_terminate_time']) { |
640 | 640 |
$timedout = true; |
641 |
$term_cause = 5; // Session-Timeout
|
|
641 |
$term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
|
|
642 | 642 |
} |
643 | 643 |
} |
644 | 644 |
|
... | ... | |
653 | 653 |
$lastact = $lastact ? $lastact : $cpentry['allow_time']; |
654 | 654 |
if ($lastact && (($pruning_time - $lastact) >= $uidletimeout)) { |
655 | 655 |
$timedout = true; |
656 |
$term_cause = 4; // Idle-Timeout
|
|
656 |
$term_cause = RADIUS_TERM_IDLE_TIMEOUT; // Idle-Timeout
|
|
657 | 657 |
$stop_time = $lastact; // Entry added to comply with WISPr |
658 | 658 |
} |
659 | 659 |
} |
... | ... | |
662 | 662 |
if (!$timedout && isset($vcpcfg['enable']) && !empty($cpentry['session_timeout'])) { |
663 | 663 |
if ($pruning_time >= ($cpentry['allow_time'] + $cpentry['session_timeout'])) { |
664 | 664 |
$timedout = true; |
665 |
$term_cause = 5; // Session-Timeout
|
|
665 |
$term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
|
|
666 | 666 |
$voucher_needs_sync = true; |
667 | 667 |
} |
668 | 668 |
} |
... | ... | |
671 | 671 |
if (!$timedout && isset($cpcfg['radiussession_timeout']) && !empty($cpentry['session_timeout'])) { |
672 | 672 |
if ($pruning_time >= ($cpentry['allow_time'] + $cpentry['session_timeout'])) { |
673 | 673 |
$timedout = true; |
674 |
$term_cause = 5; // Session-Timeout
|
|
674 |
$term_cause = RADIUS_TERM_SESSION_TIMEOUT; // Session-Timeout
|
|
675 | 675 |
} |
676 | 676 |
} |
677 | 677 |
|
... | ... | |
693 | 693 |
$radiusservers, |
694 | 694 |
$cpentry['ip'], // clientip |
695 | 695 |
$cpentry['mac'], // clientmac |
696 |
10); // NAS Request
|
|
696 |
RADIUS_TERM_NAS_REQUEST); // NAS Request
|
|
697 | 697 |
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ZERO_ENTRY_STATS, 1, $cpentry[2]); |
698 | 698 |
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ZERO_ENTRY_STATS, 2, $cpentry[2]); |
699 | 699 |
RADIUS_ACCOUNTING_START($cpentry['pipeno'], // ruleno |
... | ... | |
718 | 718 |
$radiusservers, |
719 | 719 |
$cpentry['ip'], // clientip |
720 | 720 |
$cpentry['mac'], // clientmac |
721 |
10, // NAS Request
|
|
721 |
0,
|
|
722 | 722 |
true); // Interim Updates |
723 | 723 |
} |
724 | 724 |
} |
... | ... | |
733 | 733 |
$cpentry['mac'], // clientmac |
734 | 734 |
$cpentry['pipeno']); // ruleno |
735 | 735 |
if ($auth_list['auth_val'] == 3) { |
736 |
captiveportal_disconnect($cpentry, $radiusservers, 17);
|
|
736 |
captiveportal_disconnect($cpentry, $radiusservers, RADIUS_TERM_NAS_REQUEST);
|
|
737 | 737 |
captiveportal_logportalauth($cpentry['username'], $cpentry['mac'], $cpentry['ip'], "RADIUS_DISCONNECT", $auth_list['reply_message']); |
738 | 738 |
$unsetindexes[] = $cpentry['sessionid']; |
739 | 739 |
} else if ($auth_list['auth_val'] == 2) |
... | ... | |
911 | 911 |
$radiusservers[$cpentry['context']], |
912 | 912 |
$cpentry['ip'], // clientip |
913 | 913 |
$cpentry['mac'], // clientmac |
914 |
7); // Admin Reboot
|
|
914 |
RADIUS_TERM_NAS_REBOOT); // Admin Reboot
|
|
915 | 915 |
} |
916 | 916 |
} |
917 | 917 |
} |
... | ... | |
1787 | 1787 |
$remaining_time = 0; |
1788 | 1788 |
|
1789 | 1789 |
/* This user was already logged in so we disconnect the old one */ |
1790 |
captiveportal_disconnect($cpentry,$radiusservers[$cpentry['context']],13);
|
|
1790 |
captiveportal_disconnect($cpentry,$radiusservers[$cpentry['context']],RADIUS_TERM_PORT_PREEMPTED);
|
|
1791 | 1791 |
captiveportal_logportalauth($cpentry['username'],$cpentry['mac'],$cpentry['ip'],"CONCURRENT LOGIN - TERMINATING OLD SESSION"); |
1792 | 1792 |
$unsetindexes[] = $cpentry['sessionid']; |
1793 | 1793 |
break; |
... | ... | |
1796 | 1796 |
/* on the same username */ |
1797 | 1797 |
if (strcasecmp($cpentry['username'], $username) == 0) { |
1798 | 1798 |
/* This user was already logged in so we disconnect the old one */ |
1799 |
captiveportal_disconnect($cpentry,$radiusservers[$cpentry['context']],13);
|
|
1799 |
captiveportal_disconnect($cpentry,$radiusservers[$cpentry['context']],RADIUS_TERM_PORT_PREEMPTED);
|
|
1800 | 1800 |
captiveportal_logportalauth($cpentry['username'],$cpentry['mac'],$cpentry['ip'],"CONCURRENT LOGIN - TERMINATING OLD SESSION"); |
1801 | 1801 |
$unsetindexes[] = $cpentry['sessionid']; |
1802 | 1802 |
break; |
Also available in: Unified diff
while we're here, send named termination causes