import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1144934 - Add support for NSIS 3.0b1 in configure.in. r=gps (68c2d307ea)
- Bug 1146096: configure.in updates for SCTP and musl.libc (sys/queue.h) r=glandium (1ee3be321a)
- Bug 1139020: Update SCTP library from upstream to rev 9168 rs=jesup (59aff8e427)
- Bug 1139020: rollup of sctp modifications for Android rs=jesup (0c207e42fa)
- Bug 1146096: update usrsctp to rev 9209 from upstream rs=jesup (d48529adb5)
- Bug 1146096: rollup of sctp modifications for Android rs=jesup (72296c9831)
- (configure) Update embedded libpng to version 1.6.28 (9c91526374)
- Bug 1138845 - Don't require atk-bridge for gtk+3 builds. r=tbsaunde (b3954d62cc)
- Bug 1159273 - Allow loading of tree cairo and system cairo at the same time. r=glandium (4f1a58a49f)
- Bug 1138845 - Fixup for bustage. r=me (dff1a71582)
- Bug 1159273 - Update Cairo/Pixman renaming to not leak the symbols we use and silence linker warnings. r=jrmuizel (77daf01890)
- Bug 1159273 - Update gkmedias symbol defs to catch up with the Cairo/Pixman renames. r=jrmuizel (c69fece38b)
- Bug 1159273 - Fix out-dated Cairo usage that may fail to build or work properly when system Cairo is involved. r=jrmuizel (352f69f8f5)
- Bug 1159273 - call g_type_init in nsAppShell::Init. r=glandium (61e1857a64)
pull/8/head
roytam1 7 months ago
parent c7924fe232
commit d8ae511537
  1. 30
      accessible/atk/Platform.cpp
  2. 6
      config/system-headers
  3. 18
      configure.in
  4. 48
      gfx/cairo/cairo/src/cairo-rename.h
  5. 17
      gfx/cairo/cairo/src/pixman-rename.h
  6. 2
      gfx/thebes/gfxFontTest.h
  7. 62
      layout/media/symbols.def.in
  8. 1
      media/webrtc/signaling/test/common.build
  9. 2
      netwerk/sctp/sctp_update.log
  10. 27
      netwerk/sctp/src/netinet/sctp.h
  11. 237
      netwerk/sctp/src/netinet/sctp_asconf.c
  12. 35
      netwerk/sctp/src/netinet/sctp_auth.c
  13. 5
      netwerk/sctp/src/netinet/sctp_auth.h
  14. 47
      netwerk/sctp/src/netinet/sctp_bsd_addr.c
  15. 4
      netwerk/sctp/src/netinet/sctp_callout.c
  16. 64
      netwerk/sctp/src/netinet/sctp_cc_functions.c
  17. 52
      netwerk/sctp/src/netinet/sctp_constants.h
  18. 14
      netwerk/sctp/src/netinet/sctp_header.h
  19. 768
      netwerk/sctp/src/netinet/sctp_indata.c
  20. 674
      netwerk/sctp/src/netinet/sctp_input.c
  21. 4
      netwerk/sctp/src/netinet/sctp_input.h
  22. 153
      netwerk/sctp/src/netinet/sctp_os_userspace.h
  23. 1108
      netwerk/sctp/src/netinet/sctp_output.c
  24. 6
      netwerk/sctp/src/netinet/sctp_output.h
  25. 486
      netwerk/sctp/src/netinet/sctp_pcb.c
  26. 13
      netwerk/sctp/src/netinet/sctp_pcb.h
  27. 20
      netwerk/sctp/src/netinet/sctp_peeloff.c
  28. 54
      netwerk/sctp/src/netinet/sctp_structs.h
  29. 1216
      netwerk/sctp/src/netinet/sctp_sysctl.c
  30. 92
      netwerk/sctp/src/netinet/sctp_sysctl.h
  31. 84
      netwerk/sctp/src/netinet/sctp_timer.c
  32. 24
      netwerk/sctp/src/netinet/sctp_uio.h
  33. 31
      netwerk/sctp/src/netinet/sctp_userspace.c
  34. 1484
      netwerk/sctp/src/netinet/sctp_usrreq.c
  35. 80
      netwerk/sctp/src/netinet/sctp_var.h
  36. 454
      netwerk/sctp/src/netinet/sctputil.c
  37. 42
      netwerk/sctp/src/netinet/sctputil.h
  38. 77
      netwerk/sctp/src/netinet6/sctp6_usrreq.c
  39. 13
      netwerk/sctp/src/netinet6/sctp6_var.h
  40. 7
      netwerk/sctp/src/user_environment.h
  41. 4
      netwerk/sctp/src/user_ip_icmp.h
  42. 4
      netwerk/sctp/src/user_malloc.h
  43. 3
      netwerk/sctp/src/user_queue.h
  44. 2
      netwerk/sctp/src/user_route.h
  45. 47
      netwerk/sctp/src/user_socket.c
  46. 4
      netwerk/sctp/src/user_socketvar.h
  47. 40
      netwerk/sctp/src/usrsctp.h
  48. 12
      widget/gtk/moz.build
  49. 6
      widget/gtk/nsAppShell.cpp
  50. 92
      widget/gtk/nsWindow.cpp
  51. 5
      widget/windows/nsWindowGfx.cpp
  52. 5
      widget/windows/nsWindowGfx.h

@ -18,8 +18,9 @@
#include <dbus/dbus.h>
#endif
#include <gtk/gtk.h>
#if (MOZ_WIDGET_GTK == 3)
#include <atk-bridge.h>
extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]);
#endif
using namespace mozilla;
@ -46,7 +47,6 @@ static gulong sToplevel_hide_hook = 0;
GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
#if (MOZ_WIDGET_GTK == 2)
struct GnomeAccessibilityModule
{
const char *libName;
@ -67,11 +67,13 @@ static GnomeAccessibilityModule sAtkBridge = {
"gnome_accessibility_module_shutdown", nullptr
};
#if (MOZ_WIDGET_GTK == 2)
static GnomeAccessibilityModule sGail = {
"libgail.so", nullptr,
"gnome_accessibility_module_init", nullptr,
"gnome_accessibility_module_shutdown", nullptr
};
#endif
static nsresult
LoadGtkModule(GnomeAccessibilityModule& aModule)
@ -98,7 +100,11 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
else
subLen = loc2 - loc1;
nsAutoCString sub(Substring(libPath, loc1, subLen));
#if (MOZ_WIDGET_GTK == 2)
sub.AppendLiteral("/gtk-2.0/modules/");
#else
sub.AppendLiteral("/gtk-3.0/modules/");
#endif
sub.Append(aModule.libName);
aModule.lib = PR_LoadLibrary(sub.get());
if (aModule.lib)
@ -123,7 +129,6 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
}
return NS_OK;
}
#endif // (MOZ_WIDGET_GTK == 2)
void
a11y::PlatformInit()
@ -175,14 +180,17 @@ a11y::PlatformInit()
// Init atk-bridge now
PR_SetEnv("NO_AT_BRIDGE=0");
#if (MOZ_WIDGET_GTK == 2)
rv = LoadGtkModule(sAtkBridge);
if (NS_SUCCEEDED(rv)) {
(*sAtkBridge.init)();
}
#else
atk_bridge_adaptor_init(nullptr, nullptr);
#if (MOZ_WIDGET_GTK == 3)
if (atk_bridge_adaptor_init) {
atk_bridge_adaptor_init(nullptr, nullptr);
} else
#endif
{
nsresult rv = LoadGtkModule(sAtkBridge);
if (NS_SUCCEEDED(rv)) {
(*sAtkBridge.init)();
}
}
if (!sToplevel_event_hook_added) {
sToplevel_event_hook_added = true;
@ -210,7 +218,6 @@ a11y::PlatformShutdown()
sToplevel_hide_hook);
}
#if (MOZ_WIDGET_GTK == 2)
if (sAtkBridge.lib) {
// Do not shutdown/unload atk-bridge,
// an exit function registered will take care of it
@ -221,6 +228,7 @@ a11y::PlatformShutdown()
sAtkBridge.init = nullptr;
sAtkBridge.shutdown = nullptr;
}
#if (MOZ_WIDGET_GTK == 2)
if (sGail.lib) {
// Do not shutdown gail because
// 1) Maybe it's not init-ed by us. e.g. GtkEmbed

@ -189,7 +189,6 @@ asm/signal.h
ASRegistry.h
assert.h
atk/atk.h
atk-bridge.h
atlcom.h
atlconv.h
atlctl.cpp
@ -239,10 +238,6 @@ bstring.h
builtin.h
Button.h
byteswap.h
#if MOZ_TREE_CAIRO!=1
#define WRAP_CAIRO_HEADERS
#endif
#ifdef WRAP_CAIRO_HEADERS
pixman.h
cairo.h
cairo-atsui.h
@ -259,7 +254,6 @@ cairo-xlib-xrender.h
cairo-directfb.h
cairo-qpainter.h
cairo-qt.h
#endif
complex
dfiff.h
exception

@ -50,7 +50,7 @@ _SUBDIR_CONFIG_ARGS="$ac_configure_args"
dnl Set the version number of the libs included in-tree
dnl ========================================================
MOZJPEG=62
MOZPNG=10616
MOZPNG=10628
MOZWEBP=043
NSPR_VERSION=4
NSPR_MINVER=4.15.0
@ -2664,6 +2664,7 @@ MOZ_CHECK_HEADERS([linux/quota.h],,,[#include <sys/socket.h>])
dnl SCTP support - needs various network include headers
MOZ_CHECK_HEADERS([linux/if_addr.h linux/rtnetlink.h],,,[#include <sys/socket.h>])
MOZ_CHECK_HEADERS(sys/queue.h)
MOZ_CHECK_HEADERS(sys/types.h netinet/in.h byteswap.h)
@ -4241,7 +4242,7 @@ fi
if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_ENABLE_GTK3"; then
PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 atk-bridge-2.0 $GDK_PACKAGES)
PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES)
MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS"
dnl Contrary to MOZ_GTK2_LIBS, MOZ_GTK3_LIBS needs to be literally added to TK_LIBS instead
dnl of a make reference because of how TK_LIBS is mangled in toolkit/library/moz.build
@ -6002,7 +6003,7 @@ dnl is not yet sufficient).
if test "$OS_ARCH" = "WINNT"; then
MIN_NSIS_MAJOR_VER=2
MIN_NSIS_MINOR_VER=46
MOZ_PATH_PROGS(MAKENSISU, $MAKENSISU makensisu-3.0a2.exe makensisu-2.46.exe makensis)
MOZ_PATH_PROGS(MAKENSISU, $MAKENSISU makensis-3.0b1.exe makensisu-3.0a2.exe makensisu-2.46.exe makensis)
if test -n "$MAKENSISU" -a "$MAKENSISU" != ":"; then
AC_MSG_RESULT([yes])
MAKENSISU_VER=`"$MAKENSISU" -version 2>/dev/null`
@ -7708,13 +7709,7 @@ dnl ========================================================
dnl Check for pixman and cairo
dnl ========================================================
if test "$MOZ_WIDGET_TOOLKIT" = "gtk3" ; then
# cairo-gtk3 can be build with system-cairo only
MOZ_TREE_CAIRO=
else
MOZ_TREE_CAIRO=1
fi
MOZ_TREE_CAIRO=1
MOZ_ARG_ENABLE_BOOL(system-cairo,
[ --enable-system-cairo Use system cairo (located with pkgconfig)],
MOZ_TREE_CAIRO=,
@ -7806,9 +7801,6 @@ if test "$MOZ_TREE_CAIRO"; then
MOZ_CHECK_HEADER(d3d10.h, MOZ_ENABLE_D3D10_LAYER=1)
fi
;;
gtk3)
AC_MSG_ERROR([cairo-gtk3 toolkit is incompatible with in-tree cairo. Please add --enable-system-cairo to your build config.])
;;
esac
if test "$USE_FC_FREETYPE"; then
FC_FONT_FEATURE="#define CAIRO_HAS_FC_FONT 1"

@ -14,11 +14,44 @@
#define cairo_copy_path_flat _moz_cairo_copy_path_flat
#define cairo_create _moz_cairo_create
#define cairo_curve_to _moz_cairo_curve_to
#define cairo_d2d_create_device _moz_cairo_d2d_create_device
#define cairo_d2d_create_device_from_d3d10device _moz_cairo_d2d_create_device_from_d3d10device
#define cairo_d2d_device_get_device _moz_cairo_d2d_device_get_device
#define cairo_d2d_get_dc _moz_cairo_d2d_get_dc
#define cairo_d2d_get_image_surface_cache_usage _moz_cairo_d2d_get_image_surface_cache_usage
#define cairo_d2d_get_surface_vram_usage _moz_cairo_d2d_get_surface_vram_usage
#define cairo_d2d_present_backbuffer _moz_cairo_d2d_present_backbuffer
#define cairo_d2d_release_dc _moz_cairo_d2d_release_dc
#define cairo_d2d_scroll _moz_cairo_d2d_scroll
#define cairo_d2d_surface_create _moz_cairo_d2d_surface_create
#define cairo_d2d_surface_create_for_handle _moz_cairo_d2d_surface_create_for_handle
#define cairo_d2d_surface_create_for_hwnd _moz_cairo_d2d_surface_create_for_hwnd
#define cairo_d2d_surface_create_for_texture _moz_cairo_d2d_surface_create_for_texture
#define cairo_d2d_surface_get_height _moz_cairo_d2d_surface_get_height
#define cairo_d2d_surface_get_texture _moz_cairo_d2d_surface_get_texture
#define cairo_d2d_surface_get_width _moz_cairo_d2d_surface_get_width
#define cairo_debug_reset_static_data _moz_cairo_debug_reset_static_data
#define cairo_destroy _moz_cairo_destroy
#define cairo_device_acquire _moz_cairo_device_acquire
#define cairo_device_destroy _moz_cairo_device_destroy
#define cairo_device_finish _moz_cairo_device_finish
#define cairo_device_flush _moz_cairo_device_flush
#define cairo_device_get_reference_count _moz_cairo_device_get_reference_count
#define cairo_device_get_type _moz_cairo_device_get_type
#define cairo_device_get_user_data _moz_cairo_device_get_user_data
#define cairo_device_release _moz_cairo_device_release
#define cairo_device_set_user_data _moz_cairo_device_set_user_data
#define cairo_device_status _moz_cairo_device_status
#define cairo_device_reference _moz_cairo_device_reference
#define cairo_device_to_user _moz_cairo_device_to_user
#define cairo_device_to_user_distance _moz_cairo_device_to_user_distance
#define cairo_directfb_surface_create _moz_cairo_directfb_surface_create
#define cairo_dwrite_font_face_create_for_dwrite_fontface _moz_cairo_dwrite_font_face_create_for_dwrite_fontface
#define cairo_dwrite_get_cleartype_rendering_mode _moz_cairo_dwrite_get_cleartype_rendering_mode
#define cairo_dwrite_scaled_font_allow_manual_show_glyphs _moz_cairo_dwrite_scaled_font_allow_manual_show_glyphs
#define cairo_dwrite_scaled_font_get_force_GDI_classic _moz_cairo_dwrite_scaled_font_get_force_GDI_classic
#define cairo_dwrite_scaled_font_set_force_GDI_classic _moz_cairo_dwrite_scaled_font_set_force_GDI_classic
#define cairo_dwrite_set_cleartype_params _moz_cairo_dwrite_set_cleartype_params
#define cairo_fill _moz_cairo_fill
#define cairo_fill_extents _moz_cairo_fill_extents
#define cairo_fill_preserve _moz_cairo_fill_preserve
@ -112,6 +145,7 @@
#define cairo_move_to _moz_cairo_move_to
#define cairo_new_path _moz_cairo_new_path
#define cairo_new_sub_path _moz_cairo_new_sub_path
#define cairo_null_surface_create _moz_cairo_null_surface_create
#define cairo_os2_fini _moz_cairo_os2_fini
#define cairo_os2_init _moz_cairo_os2_init
#define cairo_os2_surface_create _moz_cairo_os2_surface_create
@ -215,9 +249,12 @@
#define cairo_region_translate _moz_cairo_region_translate
#define cairo_region_union _moz_cairo_region_union
#define cairo_region_union_rectangle _moz_cairo_region_union_rectangle
#define cairo_region_xor _moz_cairo_region_xor
#define cairo_region_xor_rectangle _moz_cairo_region_xor_rectangle
#define cairo_rel_curve_to _moz_cairo_rel_curve_to
#define cairo_rel_line_to _moz_cairo_rel_line_to
#define cairo_rel_move_to _moz_cairo_rel_move_to
#define cairo_release_device _moz_cairo_release_device
#define cairo_reset_clip _moz_cairo_reset_clip
#define cairo_restore _moz_cairo_restore
#define cairo_rotate _moz_cairo_rotate
@ -271,12 +308,16 @@
#define cairo_stroke_extents _moz_cairo_stroke_extents
#define cairo_stroke_preserve _moz_cairo_stroke_preserve
#define cairo_stroke_to_path _moz_cairo_stroke_to_path
#define cairo_surface_attach_snapshot _moz_cairo_surface_attach_snapshot
#define cairo_surface_copy_page _moz_cairo_surface_copy_page
#define cairo_surface_create_for_rectangle _moz_cairo_surface_create_for_rectangle
#define cairo_surface_create_similar _moz_cairo_surface_create_similar
#define cairo_surface_detach_snapshot _moz_cairo_surface_detach_snapshot
#define cairo_surface_destroy _moz_cairo_surface_destroy
#define cairo_surface_finish _moz_cairo_surface_finish
#define cairo_surface_flush _moz_cairo_surface_flush
#define cairo_surface_get_content _moz_cairo_surface_get_content
#define cairo_surface_get_device _moz_cairo_surface_get_device
#define cairo_surface_get_device_offset _moz_cairo_surface_get_device_offset
#define cairo_surface_get_fallback_resolution _moz_cairo_surface_get_fallback_resolution
#define cairo_surface_get_font_options _moz_cairo_surface_get_font_options
@ -330,6 +371,8 @@
#define cairo_user_to_device_distance _moz_cairo_user_to_device_distance
#define cairo_version _moz_cairo_version
#define cairo_version_string _moz_cairo_version_string
#define cairo_win32_get_dc_with_clip _moz_cairo_win32_get_dc_with_clip
#define cairo_win32_get_system_text_quality _moz_cairo_win32_get_system_text_quality
#define cairo_win32_font_face_create_for_hfont _moz_cairo_win32_font_face_create_for_hfont
#define cairo_win32_font_face_create_for_logfontw _moz_cairo_win32_font_face_create_for_logfontw
#define cairo_win32_font_face_create_for_logfontw_hfont _moz_cairo_win32_font_face_create_for_logfontw_hfont
@ -340,11 +383,15 @@
#define cairo_win32_scaled_font_get_metrics_factor _moz_cairo_win32_scaled_font_get_metrics_factor
#define cairo_win32_scaled_font_select_font _moz_cairo_win32_scaled_font_select_font
#define cairo_win32_surface_create _moz_cairo_win32_surface_create
#define cairo_win32_surface_create_with_alpha _moz_cairo_win32_surface_create_with_alpha
#define cairo_win32_surface_create_with_d3dsurface9 _moz_cairo_win32_surface_create_with_d3dsurface9
#define cairo_win32_surface_create_with_ddb _moz_cairo_win32_surface_create_with_ddb
#define cairo_win32_surface_create_with_dib _moz_cairo_win32_surface_create_with_dib
#define cairo_win32_surface_get_dc _moz_cairo_win32_surface_get_dc
#define cairo_win32_surface_get_height _moz_cairo_win32_surface_get_height
#define cairo_win32_surface_get_image _moz_cairo_win32_surface_get_image
#define cairo_win32_surface_get_width _moz_cairo_win32_surface_get_width
#define cairo_win32_surface_set_can_convert_to_dib _moz_cairo_win32_surface_set_can_convert_to_dib
#define cairo_xcb_surface_create _moz_cairo_xcb_surface_create
#define cairo_xcb_surface_create_for_bitmap _moz_cairo_xcb_surface_create_for_bitmap
#define cairo_xcb_surface_create_with_xrender_format _moz_cairo_xcb_surface_create_with_xrender_format
@ -362,4 +409,3 @@
#define cairo_xlib_surface_get_xrender_format _moz_cairo_xlib_surface_get_xrender_format
#define cairo_xlib_surface_set_drawable _moz_cairo_xlib_surface_set_drawable
#define cairo_xlib_surface_set_size _moz_cairo_xlib_surface_set_size
#include "pixman-rename.h"

@ -1,4 +1,15 @@
#ifdef MOZ_TREE_PIXMAN
#define pixman_composite_glyphs _moz_pixman_composite_glyphs
#define pixman_composite_glyphs_no_mask _moz_pixman_composite_glyphs_no_mask
#define pixman_glyph_cache_create _moz_pixman_glyph_cache_create
#define pixman_glyph_cache_destroy _moz_pixman_glyph_cache_destroy
#define pixman_glyph_cache_freeze _moz_pixman_glyph_cache_freeze
#define pixman_glyph_cache_insert _moz_pixman_glyph_cache_insert
#define pixman_glyph_cache_lookup _moz_pixman_glyph_cache_lookup
#define pixman_glyph_cache_remove _moz_pixman_glyph_cache_remove
#define pixman_glyph_cache_thaw _moz_pixman_glyph_cache_thaw
#define pixman_glyph_get_extents _moz_pixman_glyph_get_extents
#define pixman_glyph_get_mask_format _moz_pixman_glyph_get_mask_format
#define pixman_region_set_static_pointers _moz_pixman_region_set_static_pointers
#define pixman_region_init _moz_pixman_region_init
#define pixman_region_init_rect _moz_pixman_region_init_rect
@ -21,6 +32,8 @@
#define pixman_region_equal _moz_pixman_region_equal
#define pixman_region_selfcheck _moz_pixman_region_selfcheck
#define pixman_region_reset _moz_pixman_region_reset
#define pixman_region_clear _moz_pixman_region_clear
#define pixman_region_print _moz_pixman_region_print
#define pixman_region32_init _moz_pixman_region32_init
#define pixman_region32_init_rect _moz_pixman_region32_init_rect
#define pixman_region32_init_rects _moz_pixman_region32_init_rects
@ -45,6 +58,7 @@
#define pixman_region32_selfcheck _moz_pixman_region32_selfcheck
#define pixman_region32_reset _moz_pixman_region32_reset
#define pixman_region32_clear _moz_pixman_region32_clear
#define pixman_region32_print _moz_pixman_region32_print
#define pixman_blt _moz_pixman_blt
#define pixman_fill _moz_pixman_fill
#define pixman_transform_point_3d _moz_pixman_transform_point_3d
@ -86,6 +100,9 @@
#define pixman_rasterize_edges _moz_pixman_rasterize_edges
#define pixman_add_traps _moz_pixman_add_traps
#define pixman_add_trapezoids _moz_pixman_add_trapezoids
#define pixman_add_triangles _moz_pixman_add_triangles
#define pixman_composite_trapezoids _moz_pixman_composite_trapezoids
#define pixman_composite_triangles _moz_pixman_composite_triangles
#define pixman_rasterize_trapezoid _moz_pixman_rasterize_trapezoid
#define pixman_disable_out_of_bounds_workaround _moz_pixman_disable_out_of_bounds_workaround
#define pixman_f_transform_bounds _moz_pixman_f_transform_bounds

@ -9,7 +9,7 @@
#include "nsString.h"
#include "nsTArray.h"
#include "cairo/cairo.h"
#include "cairo.h"
struct gfxFontTestItem {
gfxFontTestItem(const nsCString& fontName,

@ -347,10 +347,32 @@ _moz_cairo_copy_path
_moz_cairo_copy_path_flat
_moz_cairo_create
_moz_cairo_curve_to
_moz_cairo_d2d_create_device
_moz_cairo_d2d_create_device_from_d3d10device
_moz_cairo_d2d_device_get_device
_moz_cairo_d2d_get_dc
_moz_cairo_d2d_get_image_surface_cache_usage
_moz_cairo_d2d_get_surface_vram_usage
_moz_cairo_d2d_present_backbuffer
_moz_cairo_d2d_release_dc
_moz_cairo_d2d_scroll
_moz_cairo_d2d_surface_create
_moz_cairo_d2d_surface_create_for_handle
_moz_cairo_d2d_surface_create_for_hwnd
_moz_cairo_d2d_surface_create_for_texture
_moz_cairo_d2d_surface_get_height
_moz_cairo_d2d_surface_get_texture
_moz_cairo_d2d_surface_get_width
_moz_cairo_debug_reset_static_data
_moz_cairo_destroy
_moz_cairo_device_to_user
_moz_cairo_device_to_user_distance
_moz_cairo_dwrite_font_face_create_for_dwrite_fontface
_moz_cairo_dwrite_get_cleartype_rendering_mode
_moz_cairo_dwrite_scaled_font_allow_manual_show_glyphs
_moz_cairo_dwrite_scaled_font_get_force_GDI_classic
_moz_cairo_dwrite_scaled_font_set_force_GDI_classic
_moz_cairo_dwrite_set_cleartype_params
_moz_cairo_fill
_moz_cairo_fill_extents
_moz_cairo_fill_preserve
@ -405,6 +427,7 @@ _moz_cairo_matrix_translate
_moz_cairo_move_to
_moz_cairo_new_path
_moz_cairo_new_sub_path
_moz_cairo_null_surface_create
_moz_cairo_paint
_moz_cairo_paint_with_alpha
_moz_cairo_path_destroy
@ -438,6 +461,7 @@ _moz_cairo_push_group_with_content
_moz_cairo_rectangle
_moz_cairo_rectangle_list_destroy
_moz_cairo_reference
_moz_cairo_release_device
_moz_cairo_reset_clip
_moz_cairo_restore
_moz_cairo_rotate
@ -471,6 +495,7 @@ _moz_cairo_status_to_string
_moz_cairo_stroke
_moz_cairo_stroke_extents
_moz_cairo_stroke_preserve
_moz_cairo_surface_attach_snapshot
_moz_cairo_surface_create_similar
_moz_cairo_surface_destroy
_moz_cairo_surface_finish
@ -498,16 +523,22 @@ _moz_cairo_translate
_moz_cairo_user_to_device
_moz_cairo_user_to_device_distance
_moz_cairo_win32_font_face_create_for_logfontw_hfont
_moz_cairo_win32_get_dc_with_clip
_moz_cairo_win32_get_system_text_quality
#ifdef NS_PRINTING
_moz_cairo_win32_printing_surface_create
#endif
_moz_cairo_win32_scaled_font_select_font
_moz_cairo_win32_surface_create
_moz_cairo_win32_surface_create_with_alpha
_moz_cairo_win32_surface_create_with_d3dsurface9
_moz_cairo_win32_surface_create_with_ddb
_moz_cairo_win32_surface_create_with_dib
_moz_cairo_win32_surface_get_dc
_moz_cairo_win32_surface_get_height
_moz_cairo_win32_surface_get_image
_moz_cairo_win32_surface_get_width
_moz_cairo_win32_surface_set_can_convert_to_dib
#ifdef MOZ_TREE_PIXMAN
_moz_pixman_image_composite32
_moz_pixman_image_create_bits
@ -540,37 +571,6 @@ _moz_pixman_region32_selfcheck
_moz_pixman_region32_reset
_moz_pixman_region32_clear
#endif
cairo_d2d_create_device
cairo_d2d_create_device_from_d3d10device
cairo_d2d_device_get_device
cairo_d2d_get_dc
cairo_d2d_get_image_surface_cache_usage
cairo_d2d_get_surface_vram_usage
cairo_d2d_present_backbuffer
cairo_d2d_release_dc
cairo_d2d_scroll
cairo_d2d_surface_create
cairo_d2d_surface_create_for_handle
cairo_d2d_surface_create_for_hwnd
cairo_d2d_surface_create_for_texture
cairo_d2d_surface_get_height
cairo_d2d_surface_get_texture
cairo_d2d_surface_get_width
cairo_dwrite_font_face_create_for_dwrite_fontface
cairo_dwrite_get_cleartype_rendering_mode
cairo_dwrite_scaled_font_allow_manual_show_glyphs
cairo_dwrite_scaled_font_get_force_GDI_classic
cairo_dwrite_scaled_font_set_force_GDI_classic
cairo_dwrite_set_cleartype_params
cairo_null_surface_create
cairo_release_device
cairo_surface_attach_snapshot
cairo_win32_get_dc_with_clip
cairo_win32_get_system_text_quality
cairo_win32_surface_create_with_alpha
cairo_win32_surface_get_height
cairo_win32_surface_get_width
cairo_win32_surface_set_can_convert_to_dib
#endif
hb_blob_create
hb_blob_destroy

@ -123,6 +123,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
OS_LIBS += CONFIG['XLIBS']
OS_LIBS += CONFIG['MOZ_GTK3_LIBS']
USE_LIBS += [
'freetype',

@ -14,3 +14,5 @@ sctp updated to version 8279 from SVN on Thu Sep 20 18:19:24 EDT 2012
sctp updated to version 8397 from SVN on Wed Jan 9 00:41:16 EST 2013
sctp updated to version 8443 from SVN on Sun Mar 31 09:05:07 EDT 2013
sctp updated to version 8815 from SVN on Tue Mar 4 08:50:51 EST 2014
sctp updated to version 9168 from SVN on Tue Mar 3 12:11:40 EST 2015
sctp updated to version 9209 from SVN on Tue Mar 24 18:11:59 EDT 2015

@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: head/sys/netinet/sctp.h 254248 2013-08-12 13:52:15Z tuexen $");
__FBSDID("$FreeBSD: head/sys/netinet/sctp.h 279859 2015-03-10 19:49:25Z tuexen $");
#endif
#ifndef _NETINET_SCTP_H_
@ -53,13 +53,13 @@ __FBSDID("$FreeBSD: head/sys/netinet/sctp.h 254248 2013-08-12 13:52:15Z tuexen $
#endif
/*
* SCTP protocol - RFC2960.
* SCTP protocol - RFC4960.
*/
struct sctphdr {
uint16_t src_port; /* source port */
uint16_t dest_port; /* destination port */
uint32_t v_tag; /* verification tag of packet */
uint32_t checksum; /* Adler32 C-Sum */
uint32_t checksum; /* CRC32C checksum */
/* chunks follow... */
} SCTP_PACKED;
@ -131,6 +131,14 @@ struct sctp_paramhdr {
#define SCTP_DEFAULT_PRINFO 0x00000022
#define SCTP_PEER_ADDR_THLDS 0x00000023
#define SCTP_REMOTE_UDP_ENCAPS_PORT 0x00000024
#define SCTP_ECN_SUPPORTED 0x00000025
#define SCTP_PR_SUPPORTED 0x00000026
#define SCTP_AUTH_SUPPORTED 0x00000027
#define SCTP_ASCONF_SUPPORTED 0x00000028
#define SCTP_RECONFIG_SUPPORTED 0x00000029
#define SCTP_NRSACK_SUPPORTED 0x00000030
#define SCTP_PKTDROP_SUPPORTED 0x00000031
#define SCTP_MAX_CWND 0x00000032
/*
* read-only options
@ -143,6 +151,8 @@ struct sctp_paramhdr {
#define SCTP_GET_ASSOC_NUMBER 0x00000104 /* ro */
#define SCTP_GET_ASSOC_ID_LIST 0x00000105 /* ro */
#define SCTP_TIMEOUTS 0x00000106
#define SCTP_PR_STREAM_STATUS 0x00000107
#define SCTP_PR_ASSOC_STATUS 0x00000108
/*
* user socket options: BSD implementation specific
@ -379,6 +389,12 @@ struct sctp_paramhdr {
/*
* error cause parameters (user visible)
*/
struct sctp_gen_error_cause {
uint16_t code;
uint16_t length;
uint8_t info[];
} SCTP_PACKED;
struct sctp_error_cause {
uint16_t code;
uint16_t length;
@ -416,6 +432,11 @@ struct sctp_error_unrecognized_chunk {
struct sctp_chunkhdr ch;/* header from chunk in error */
} SCTP_PACKED;
struct sctp_error_no_user_data {
struct sctp_error_cause cause; /* code=SCTP_CAUSE_NO_USER_DATA */
uint32_t tsn; /* TSN of the empty data chunk */
} SCTP_PACKED;
/*
* Main SCTP chunk types we place these here so natd and f/w's in user land
* can find them.

@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 257803 2013-11-07 17:08:09Z tuexen $");
__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 277347 2015-01-18 20:53:20Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@ -153,7 +153,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struct sctp_asconf_paramhdr *ap
{
struct sctp_nets *net;
struct mbuf *m_reply = NULL;
struct sockaddr_storage sa_store;
union sctp_sockstore store;
struct sctp_paramhdr *ph;
uint16_t param_type, aparam_length;
#if defined(INET) || defined(INET6)
@ -177,7 +177,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struct sctp_asconf_paramhdr *ap
#if defined(INET) || defined(INET6)
param_length = ntohs(ph->param_length);
#endif
sa = (struct sockaddr *)&sa_store;
sa = &store.sa;
switch (param_type) {
#ifdef INET
case SCTP_IPV4_ADDRESS:
@ -186,7 +186,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struct sctp_asconf_paramhdr *ap
return (NULL);
}
v4addr = (struct sctp_ipv4addr_param *)ph;
sin = (struct sockaddr_in *)&sa_store;
sin = &store.sin;
bzero(sin, sizeof(*sin));
sin->sin_family = AF_INET;
#ifdef HAVE_SIN_LEN
@ -211,7 +211,7 @@ sctp_process_asconf_add_ip(struct sockaddr *src, struct sctp_asconf_paramhdr *ap
return (NULL);
}
v6addr = (struct sctp_ipv6addr_param *)ph;
sin6 = (struct sockaddr_in6 *)&sa_store;
sin6 = &store.sin6;
bzero(sin6, sizeof(*sin6));
sin6->sin6_family = AF_INET6;
#ifdef HAVE_SIN6_LEN
@ -307,7 +307,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src,
struct sctp_tcb *stcb, int response_required)
{
struct mbuf *m_reply = NULL;
struct sockaddr_storage sa_store;
union sctp_sockstore store;
struct sctp_paramhdr *ph;
uint16_t param_type, aparam_length;
#if defined(INET) || defined(INET6)
@ -331,7 +331,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src,
#if defined(INET) || defined(INET6)
param_length = ntohs(ph->param_length);
#endif
sa = (struct sockaddr *)&sa_store;
sa = &store.sa;
switch (param_type) {
#ifdef INET
case SCTP_IPV4_ADDRESS:
@ -340,7 +340,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src,
return (NULL);
}
v4addr = (struct sctp_ipv4addr_param *)ph;
sin = (struct sockaddr_in *)&sa_store;
sin = &store.sin;
bzero(sin, sizeof(*sin));
sin->sin_family = AF_INET;
#ifdef HAVE_SIN_LEN
@ -362,7 +362,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src,
return (NULL);
}
v6addr = (struct sctp_ipv6addr_param *)ph;
sin6 = (struct sockaddr_in6 *)&sa_store;
sin6 = &store.sin6;
bzero(sin6, sizeof(*sin6));
sin6->sin6_family = AF_INET6;
#ifdef HAVE_SIN6_LEN
@ -429,7 +429,7 @@ sctp_process_asconf_delete_ip(struct sockaddr *src,
aparam_length);
} else {
if (response_required) {
m_reply = sctp_asconf_success_response(aph->correlation_id);
m_reply = sctp_asconf_success_response(aph->correlation_id);
}
/* notify upper layer */
sctp_ulp_notify(SCTP_NOTIFY_ASCONF_DELETE_IP, stcb, 0, sa, SCTP_SO_NOT_LOCKED);
@ -443,7 +443,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src,
struct sctp_tcb *stcb, int response_required)
{
struct mbuf *m_reply = NULL;
struct sockaddr_storage sa_store;
union sctp_sockstore store;
struct sctp_paramhdr *ph;
uint16_t param_type, aparam_length;
#if defined(INET) || defined(INET6)
@ -466,7 +466,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src,
#if defined(INET) || defined(INET6)
param_length = ntohs(ph->param_length);
#endif
sa = (struct sockaddr *)&sa_store;
sa = &store.sa;
switch (param_type) {
#ifdef INET
case SCTP_IPV4_ADDRESS:
@ -475,7 +475,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src,
return (NULL);
}
v4addr = (struct sctp_ipv4addr_param *)ph;
sin = (struct sockaddr_in *)&sa_store;
sin = &store.sin;
bzero(sin, sizeof(*sin));
sin->sin_family = AF_INET;
#ifdef HAVE_SIN_LEN
@ -495,7 +495,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src,
return (NULL);
}
v6addr = (struct sctp_ipv6addr_param *)ph;
sin6 = (struct sockaddr_in6 *)&sa_store;
sin6 = &store.sin6;
bzero(sin6, sizeof(*sin6));
sin6->sin6_family = AF_INET6;
#ifdef HAVE_SIN6_LEN
@ -552,11 +552,11 @@ sctp_process_asconf_set_primary(struct sockaddr *src,
are transmitted to the new primary destination. (by micchie)
*/
if ((sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_BASE) ||
SCTP_MOBILITY_BASE) ||
sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_FASTHANDOFF)) &&
SCTP_MOBILITY_FASTHANDOFF)) &&
sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_PRIM_DELETED) &&
SCTP_MOBILITY_PRIM_DELETED) &&
(stcb->asoc.primary_destination->dest_state &
SCTP_ADDR_UNCONFIRMED) == 0) {
@ -601,7 +601,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset,
uint32_t serial_num;
struct mbuf *n, *m_ack, *m_result, *m_tail;
struct sctp_asconf_ack_chunk *ack_cp;
struct sctp_asconf_paramhdr *aph, *ack_aph;
struct sctp_asconf_paramhdr *aph;
struct sctp_ipv6addr_param *p_addr;
unsigned int asconf_limit, cnt;
int error = 0; /* did an error occur? */
@ -686,13 +686,6 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset,
}
/* param_length is already validated in process_control... */
offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */
/* get pointer to first asconf param in ASCONF-ACK */
ack_aph = (struct sctp_asconf_paramhdr *)(mtod(m_ack, caddr_t) + sizeof(struct sctp_asconf_ack_chunk));
if (ack_aph == NULL) {
SCTPDBG(SCTP_DEBUG_ASCONF1, "Gak in asconf2\n");
return;
}
/* get pointer to first asconf param in ASCONF */
aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf);
if (aph == NULL) {
@ -731,13 +724,11 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset,
}
switch (param_type) {
case SCTP_ADD_IP_ADDRESS:
asoc->peer_supports_asconf = 1;
m_result = sctp_process_asconf_add_ip(src, aph, stcb,
(cnt < SCTP_BASE_SYSCTL(sctp_hb_maxburst)), error);
cnt++;
break;
case SCTP_DEL_IP_ADDRESS:
asoc->peer_supports_asconf = 1;
m_result = sctp_process_asconf_delete_ip(src, aph, stcb,
error);
break;
@ -745,7 +736,6 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset,
/* not valid in an ASCONF chunk */
break;
case SCTP_SET_PRIM_ADDR:
asoc->peer_supports_asconf = 1;
m_result = sctp_process_asconf_set_primary(src, aph,
stcb, error);
break;
@ -936,8 +926,6 @@ sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa)
void
sctp_asconf_cleanup(struct sctp_tcb *stcb, struct sctp_nets *net)
{
/* mark peer as ASCONF incapable */
stcb->asoc.peer_supports_asconf = 0;
/*
* clear out any existing asconfs going out
*/
@ -1099,7 +1087,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struct sctp_ifa *newifa)
}
/* Retransmit unacknowledged DATA chunks immediately */
if (sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_FASTHANDOFF)) {
SCTP_MOBILITY_FASTHANDOFF)) {
sctp_net_immediate_retrans(stcb, net);
}
/* also, SET PRIMARY is maybe already sent */
@ -1157,7 +1145,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struct sctp_ifa *newifa)
continue;
/* Retransmit unacknowledged DATA chunks immediately */
if (sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_FASTHANDOFF)) {
SCTP_MOBILITY_FASTHANDOFF)) {
sctp_net_immediate_retrans(stcb, net);
}
/* Send SET PRIMARY for this new address */
@ -1193,9 +1181,9 @@ sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr, uint32_t
#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__Userspace__)
if (sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_BASE) ||
SCTP_MOBILITY_BASE) ||
sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_FASTHANDOFF)) {
SCTP_MOBILITY_FASTHANDOFF)) {
sctp_path_check_and_react(stcb, addr);
return;
}
@ -1281,7 +1269,7 @@ sctp_asconf_queue_mgmt(struct sctp_tcb *stcb, struct sctp_ifa *ifa,
{
struct sockaddr_in6 *sin6;
sin6 = (struct sockaddr_in6 *)&ifa->address.sa;
sin6 = &ifa->address.sin6;
aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS;
aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param));
aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) +
@ -1296,7 +1284,7 @@ sctp_asconf_queue_mgmt(struct sctp_tcb *stcb, struct sctp_ifa *ifa,
{
struct sockaddr_in *sin;
sin= (struct sockaddr_in *)&ifa->address.sa;
sin = &ifa->address.sin;
aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS;
aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param));
aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) +
@ -1348,7 +1336,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sctp_ifa *ifa,
int pending_delete_queued = 0;
/* see if peer supports ASCONF */
if (stcb->asoc.peer_supports_asconf == 0) {
if (stcb->asoc.asconf_supported == 0) {
return (-1);
}
@ -1434,13 +1422,12 @@ sctp_asconf_queue_sa_delete(struct sctp_tcb *stcb, struct sockaddr *sa)
{
struct sctp_ifa *ifa;
struct sctp_asconf_addr *aa, *aa_next;
uint32_t vrf_id;
if (stcb == NULL) {
return (-1);
}
/* see if peer supports ASCONF */
if (stcb->asoc.peer_supports_asconf == 0) {
if (stcb->asoc.asconf_supported == 0) {
return (-1);
}
/* make sure the request isn't already in the queue */
@ -1466,12 +1453,7 @@ sctp_asconf_queue_sa_delete(struct sctp_tcb *stcb, struct sockaddr *sa)
} /* for each aa */
/* find any existing ifa-- NOTE ifa CAN be allowed to be NULL */
if (stcb) {
vrf_id = stcb->asoc.vrf_id;
} else {
vrf_id = SCTP_DEFAULT_VRFID;
}
ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED);
ifa = sctp_find_ifa_by_addr(sa, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED);
/* adding new request to the queue */
SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa),
@ -1560,7 +1542,7 @@ sctp_asconf_find_param(struct sctp_tcb *stcb, uint32_t correlation_id)
* notifications based on the error response
*/
static void
sctp_asconf_process_error(struct sctp_tcb *stcb,
sctp_asconf_process_error(struct sctp_tcb *stcb SCTP_UNUSED,
struct sctp_asconf_paramhdr *aph)
{
struct sctp_error_cause *eh;
@ -1598,10 +1580,7 @@ sctp_asconf_process_error(struct sctp_tcb *stcb,
switch (param_type) {
case SCTP_ADD_IP_ADDRESS:
case SCTP_DEL_IP_ADDRESS:
stcb->asoc.peer_supports_asconf = 0;
break;
case SCTP_SET_PRIM_ADDR:
stcb->asoc.peer_supports_asconf = 0;
break;
default:
break;
@ -1637,8 +1616,6 @@ sctp_asconf_process_param_ack(struct sctp_tcb *stcb,
SCTPDBG(SCTP_DEBUG_ASCONF1,
"process_param_ack: set primary IP address\n");
/* nothing to do... peer may start using this addr */
if (flag == 0)
stcb->asoc.peer_supports_asconf = 0;
break;
default:
/* should NEVER happen */
@ -1656,11 +1633,11 @@ sctp_asconf_process_param_ack(struct sctp_tcb *stcb,
* cleanup from a bad asconf ack parameter
*/
static void
sctp_asconf_ack_clear(struct sctp_tcb *stcb)
sctp_asconf_ack_clear(struct sctp_tcb *stcb SCTP_UNUSED)
{
/* assume peer doesn't really know how to do asconfs */
stcb->asoc.peer_supports_asconf = 0;
/* XXX we could free the pending queue here */
}
void
@ -1900,14 +1877,26 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
* this is boundall or subset bound w/ASCONF allowed
*/
/* first, make sure it's a good address family */
/* first, make sure that the address is IPv4 or IPv6 and not jailed */
switch (ifa->address.sa.sa_family) {
#ifdef INET6
case AF_INET6:
#if defined(__FreeBSD__)
if (prison_check_ip6(inp->ip_inp.inp.inp_cred,
&ifa->address.sin6.sin6_addr) != 0) {
return;
}
#endif
break;
#endif
#ifdef INET
case AF_INET:
#if defined(__FreeBSD__)
if (prison_check_ip4(inp->ip_inp.inp.inp_cred,
&ifa->address.sin.sin_addr) != 0) {
return;
}
#endif
break;
#endif
default:
@ -1938,7 +1927,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
{
struct sockaddr_in6 *sin6;
sin6 = (struct sockaddr_in6 *)&ifa->address.sin6;
sin6 = &ifa->address.sin6;
if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
/* we skip unspecifed addresses */
return;
@ -1971,7 +1960,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
SCTP_IPV6_V6ONLY(inp6))
return;
sin = (struct sockaddr_in *)&ifa->address.sa;
sin = &ifa->address.sin;
if (sin->sin_addr.s_addr == 0) {
/* we skip unspecifed addresses */
return;
@ -1991,7 +1980,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
/* queue an asconf for this address add/delete */
if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_DO_ASCONF)) {
/* does the peer do asconf? */
if (stcb->asoc.peer_supports_asconf) {
if (stcb->asoc.asconf_supported) {
/* queue an asconf for this addr */
status = sctp_asconf_queue_add(stcb, ifa, type);
@ -2129,11 +2118,17 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
else
continue;
}
sin6 = (struct sockaddr_in6 *)&ifa->address.sin6;
sin6 = &ifa->address.sin6;
if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
/* we skip unspecifed addresses */
continue;
}
#if defined(__FreeBSD__)
if (prison_check_ip6(inp->ip_inp.inp.inp_cred,
&sin6->sin6_addr) != 0) {
continue;
}
#endif
if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
if (stcb->asoc.scope.local_scope == 0) {
continue;
@ -2159,11 +2154,17 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
SCTP_IPV6_V6ONLY(inp6))
continue;
sin = (struct sockaddr_in *)&ifa->address.sa;
sin = &ifa->address.sin;
if (sin->sin_addr.s_addr == 0) {
/* we skip unspecifed addresses */
continue;
}
#if defined(__FreeBSD__)
if (prison_check_ip4(inp->ip_inp.inp.inp_cred,
&sin->sin_addr) != 0) {
continue;
}
#endif
if (stcb->asoc.scope.ipv4_local_scope == 0 &&
IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) {
continue;
@ -2221,7 +2222,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
} else if (type == SCTP_SET_PRIM_ADDR) {
if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) == 0) {
/* must validate the ifa is in the ep */
if (sctp_is_addr_in_ep(stcb->sctp_ep,ifa) == 0) {
if (sctp_is_addr_in_ep(stcb->sctp_ep, ifa) == 0) {
continue;
}
} else {
@ -2233,7 +2234,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
}
/* queue an asconf for this address add/delete */
if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_DO_ASCONF) &&
stcb->asoc.peer_supports_asconf) {
stcb->asoc.asconf_supported == 1) {
/* queue an asconf for this addr */
status = sctp_asconf_queue_add(stcb, ifa, type);
/*
@ -2284,7 +2285,7 @@ sctp_asconf_iterator_end(void *ptr, uint32_t val SCTP_UNUSED)
int32_t
sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa)
{
uint32_t vrf_id;
uint32_t vrf_id;
struct sctp_ifa *ifa;
/* find the ifa for the desired set primary */
@ -2472,11 +2473,17 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int addr_locked)
if (stcb->asoc.scope.ipv4_addr_legal) {
struct sockaddr_in *sin;
sin = (struct sockaddr_in *)&sctp_ifa->address.sa;
sin = &sctp_ifa->address.sin;
if (sin->sin_addr.s_addr == 0) {
/* skip unspecifed addresses */
continue;
}
#if defined(__FreeBSD__)
if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred,
&sin->sin_addr) != 0) {
continue;
}
#endif
if (stcb->asoc.scope.ipv4_local_scope == 0 &&
IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))
continue;
@ -2500,11 +2507,17 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int addr_locked)
continue;
}
sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa;
sin6 = &sctp_ifa->address.sin6;
if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
/* we skip unspecifed addresses */
continue;
}
#if defined(__FreeBSD__)
if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred,
&sin6->sin6_addr) != 0) {
continue;
}
#endif
if (stcb->asoc.scope.local_scope == 0 &&
IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
continue;
@ -2762,16 +2775,13 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m,
struct sctp_paramhdr tmp_param, *ph;
uint16_t plen, ptype;
struct sctp_ifa *sctp_ifa;
union sctp_sockstore store;
#ifdef INET6
struct sctp_ipv6addr_param addr6_store;
struct sockaddr_in6 sin6;
#endif
#ifdef INET
struct sctp_ipv4addr_param addr4_store;
struct sockaddr_in sin;
#endif
struct sockaddr *sa;
uint32_t vrf_id;
SCTPDBG(SCTP_DEBUG_ASCONF2, "processing init-ack addresses\n");
if (stcb == NULL) /* Un-needed check for SA */
@ -2783,25 +2793,6 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m,
if ((offset + sizeof(struct sctp_paramhdr)) > length) {
return;
}
/* init the addresses */
#ifdef INET6
bzero(&sin6, sizeof(sin6));
sin6.sin6_family = AF_INET6;
#ifdef HAVE_SIN6_LEN
sin6.sin6_len = sizeof(sin6);
#endif
sin6.sin6_port = stcb->rport;
#endif
#ifdef INET
bzero(&sin, sizeof(sin));
sin.sin_family = AF_INET;
#ifdef HAVE_SIN_LEN
sin.sin_len = sizeof(sin);
#endif
sin.sin_port = stcb->rport;
#endif
/* go through the addresses in the init-ack */
ph = (struct sctp_paramhdr *)
sctp_m_getptr(m, offset, sizeof(struct sctp_paramhdr),
@ -2824,9 +2815,13 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m,
a6p == NULL) {
return;
}
memcpy(&sin6.sin6_addr, a6p->addr,
sizeof(struct in6_addr));
sa = (struct sockaddr *)&sin6;
memset(&store, 0, sizeof(union sctp_sockstore));
store.sin6.sin6_family = AF_INET6;
#ifdef HAVE_SIN6_LEN
store.sin6.sin6_len = sizeof(struct sockaddr_in6);
#endif
store.sin6.sin6_port = stcb->rport;
memcpy(&store.sin6.sin6_addr, a6p->addr, sizeof(struct in6_addr));
break;
}
#endif
@ -2843,8 +2838,13 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m,
a4p == NULL) {
return;
}
sin.sin_addr.s_addr = a4p->addr;
sa = (struct sockaddr *)&sin;
memset(&store, 0, sizeof(union sctp_sockstore));
store.sin.sin_family = AF_INET;
#ifdef HAVE_SIN_LEN
store.sin.sin_len = sizeof(struct sockaddr_in);
#endif
store.sin.sin_port = stcb->rport;
store.sin.sin_addr.s_addr = a4p->addr;
break;
}
#endif
@ -2853,12 +2853,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m,
}
/* see if this address really (still) exists */
if (stcb) {
vrf_id = stcb->asoc.vrf_id;
} else {
vrf_id = SCTP_DEFAULT_VRFID;
}
sctp_ifa = sctp_find_ifa_by_addr(sa, vrf_id,
sctp_ifa = sctp_find_ifa_by_addr(&store.sa, stcb->asoc.vrf_id,
SCTP_ADDR_NOT_LOCKED);
if (sctp_ifa == NULL) {
/* address doesn't exist anymore */
@ -2867,9 +2862,9 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m,
/* are ASCONFs allowed ? */
if ((sctp_is_feature_on(stcb->sctp_ep,
SCTP_PCB_FLAGS_DO_ASCONF)) &&
stcb->asoc.peer_supports_asconf) {
stcb->asoc.asconf_supported) {
/* queue an ASCONF DEL_IP_ADDRESS */
status = sctp_asconf_queue_sa_delete(stcb, sa);
status = sctp_asconf_queue_sa_delete(stcb, &store.sa);
/*
* if queued ok, and in correct state, send
* out the ASCONF.
@ -2903,7 +2898,7 @@ next_addr:
if ((offset + sizeof(struct sctp_paramhdr)) > length)
return;
ph = (struct sctp_paramhdr *)sctp_m_getptr(m, offset,
sizeof(struct sctp_paramhdr), (uint8_t *) & tmp_param);
sizeof(struct sctp_paramhdr), (uint8_t *)&tmp_param);
} /* while */
}
@ -3115,7 +3110,13 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset,
switch (sctp_ifa->address.sa.sa_family) {
#ifdef INET
case AF_INET:
sin = (struct sockaddr_in *)&sctp_ifa->address.sin;
sin = &sctp_ifa->address.sin;
#if defined(__FreeBSD__)
if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred,
&sin->sin_addr) != 0) {
continue;
}
#endif
if ((ipv4_scope == 0) &&
(IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) {
/* private address not in scope */
@ -3125,7 +3126,13 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset,
#endif
#ifdef INET6
case AF_INET6:
sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sin6;
sin6 = &sctp_ifa->address.sin6;
#if defined(__FreeBSD__)