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

haproxy, sync over all changes from haproxy-devel v0.52 #243

Merged
merged 1 commit into from
Jan 2, 2017

Conversation

PiBa-NL
Copy link
Contributor

@PiBa-NL PiBa-NL commented Dec 29, 2016

No description provided.

@rbgarga
Copy link
Member

rbgarga commented Dec 30, 2016

Please rebase your fork to make it mergeable again

$static_output .= "HAProxy, running haproxy_custom_php_install_command()\n";
update_output_window($static_output);

$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
if ($pf_version == "2.1" || $pf_version == "2.2")
if ($pf_version == "2.1" || $pf_version == "2.2") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will never reach 2.1 or 2.2 systems, so this check can be removed

mwexec("/usr/local/sbin/ipfw_context -a $ipfw_zone_haproxy -n $transparent_if", true);
if (haproxy_utils::$pf_version < 2.4) {
$rulenum = 64000; // why that high? captiveportal.inc also does it...
if (haproxy_utils::$pf_version < 2.2) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional for old version also can be removed

mwexec("/sbin/ipfw zone $ipfw_zone_haproxy madd $transparent_if", true);
}
// pfSense 2.4, captive portal rules start at 1000
$rulenum = 10;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1000 or 10?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 is right i think for haproxy, as 'zones' no longer separate stuff in ipfw contexts, and haproxy needs to catch reply traffic it shouldn't use the same rule numbers as CP which does afaik start with rule 1000, putting the rules with for haproxy with a lower number seems to work properly.

@@ -2109,9 +2127,14 @@ function load_ipfw_rules() {


file_put_contents("{$g['tmp_path']}/ipfw_{$ipfw_zone_haproxy}.haproxy.rules", $rules);
if (haproxy_utils::$pf_version < 2.2)
if (haproxy_utils::$pf_version < 2.2) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed too


$a_backends = $config['installedpackages']['haproxy']['ha_pools']['item'];
if (is_array($a_backends)) {
foreach ($a_backends as &$backend) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use a reference here (&$backend) if this variable is not changed inside the loop?

@@ -149,9 +149,10 @@ function array_moveitemsbefore(&$items, $before, $selected) {
}
} else {
$result = haproxy_check_config($retval);
if ($result)
if ($result) {
$savemsg = gettext($result);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indent

@PiBa-NL
Copy link
Contributor Author

PiBa-NL commented Jan 2, 2017

Most of above comments have been addressed in: #245

netgate-git-updates pushed a commit that referenced this pull request Aug 17, 2017
  [ Robert Edmonds ]
  * Release 1.3.0.

  * Add test case for the issue in #220 (#254).

  * Fix issue #251, "Bad enums with multiple oneofs" (#256).

  * Add warning flags to my_CFLAGS (#257).

  * Fix namespace errors when compiled with latest protobuf (#280).

  * Bump minimum required header version for proto3 syntax (#282).

  [ Paolo Borelli ]
  * Turn the compiler into a protoc plugin (#206). This allows the protobuf-c
    compiler to be invoked as "protoc --c_out=...". For backwards
    compatibility, we still ship a protoc-c command, but it's a symlink to the
    protoc-gen-c binary.

  * proto3 support (#228).

  * Remove leftover FIXME comment (#258).

  * Fix proto3 "is zeroish" evaluation (#264).

  * Small cleanup in oneof handling (#265).

  * Rework is_zeroish one more time (#267).

  * proto3: make strings default to "" instead of NULL (#274).

  [ Tomek Wasilczyk ]
  * Fix -Wsign-compare warnings (#213).

  * Fix ISO C90 -Wdeclaration-after-statement warnings (#214).

  * Fix bigendian -Wunused-label warning (#215).

  [ Ilya Lipnitsky ]
  * protoc-c/c_message.cc: Force int size on oneof enums (#221). Fixes wrong
    enum generation and handling for onceof cases (#220).

  [ Adnan ]
  * Fix cmake build if built as part of an external project (#231).

  [ Gregory Detal ]
  * Remove .pb.{cc,h} in distdir instead of top_distdir in order to prevent
    removing files from other projects when protobuf-c is included as an
    autotools subproject (#232).

  [ Ben Farnham ]
  * Relax autoconf constraint from v2.64 to v2.63 so that it works on older
    Linux distros (#233).

  [ Thomas Koeckerbauer ]
  * rm argument fix for Solaris (#234).

  * Add 'const' qualifier to 'init_value' variable in generated files (#236).

  [ Richard Kettlewell ]
  * Document and extend the effect of passing NULL to ..._free_unpacked
    functions (#255).

  [ Alex Milich ]
  * CMake: Workaround for static builds that use MSVC (#243).

  [ Josh Junon ]
  * CMake: Allow protobuf-c to be included via include_subdirectory (#245).

  [ Alexei Kasatkin ]
  * CMake: Windows fixes (#266).

This fixes the build breakage with devel/protobuf 1.3.0 [1]

PR:		221572 [1]
Sponsored by:	Farsight Security, Inc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants