Project

General

Profile

Actions

Bug #3538

closed

CaptivePortal passthrumac delete captiveportal_get_ipfw_passthru_ruleno and captiveportal_get_dn_passthru_ruleno functions

Added by Sabri Arslan about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Captive Portal
Target version:
Start date:
03/20/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1
Affected Architecture:
amd64

Description

In captive portal i successfully added passthrumac. But when i want to delete mac it can't delete ipfw pipe and rule. It only delete xml passthrumac entry.

in the body of rule number functions cut -d values is wrong. the valid code be like below. (sorry for bad english. i hope someone understand issue).

function captiveportal_get_dn_passthru_ruleno($value) {
.
.
.
        $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} |  /usr/bin/grep -v grep | /usr/bin/cut -d \" \" -f 5 | /usr/bin/head -n 1", $output);

must be
function captiveportal_get_dn_passthru_ruleno($value) {
.
.
.
        $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} |  /usr/bin/grep -v grep | /usr/bin/cut -d \" \" -f 20 | /usr/bin/head -n 1", $output);

and

function captiveportal_get_ipfw_passthru_ruleno($value) {
.
.
.
        $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} |  /usr/bin/grep -v grep | /usr/bin/cut -d \" \" -f 5 | /usr/bin/head -n 1", $output);

must be
function captiveportal_get_ipfw_passthru_ruleno($value) {
.
.
.
        $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} |  /usr/bin/grep -v grep | /usr/bin/cut -d \" \" -f 1 | /usr/bin/head -n 1", $output);

Actions

Also available in: Atom PDF